PDA

View Full Version : Tablet or touch screen



NewsArchive
06-20-2015, 07:15 AM
Hi Friedrich,

Is there (or can there be) an option in Setupbuilder to tell if the pc has a
touch screen or is a tablet?

I haven't found a good way to tell yet, but would like to be able to set an
ini entry to tell the installed program that an OSKand touch is an option in
the program.

If not, I guess I could just ask the question at install time...but I would
like it to be automatic.

Thanks

Skip

NewsArchive
06-20-2015, 07:15 AM
Skip,

> Is there (or can there be) an option in Setupbuilder to tell if the pc has a
> touch screen or is a tablet?

That would be nice. Maybe then SB could sell the technology to MS so
that every update of 10 doesn't think it's on a tablet and open popup
menus to the wrong side!!!!<g>

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Creative Reporting: http://www.CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"
And, now, Windows 10 brings us "The Inch Worm, Bumper Car of Wait!"


The life of a Clarion Developer: https://youtu.be/ozitqabi6UM

NewsArchive
06-20-2015, 07:15 AM
Hi Lee,

Yeah...I am hoping that they will fix that before RTM.

Skip

NewsArchive
06-20-2015, 07:16 AM
Skip,

> Yeah...I am hoping that they will fix that before RTM.

You can reset it but it gets to be a PITA since it resets itself with
the next build! <g>

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Creative Reporting: http://www.CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"
And, now, Windows 10 brings us "The Inch Worm, Bumper Car of Wait!"


The life of a Clarion Developer: https://youtu.be/ozitqabi6UM

NewsArchive
06-20-2015, 07:17 AM
Hi Skip,


> Is there (or can there be) an option in Setupbuilder to tell if the pc
> has a touch screen or is a tablet?

Found this suggested online for touch:
Use|GetSystemMetrics|
<http://msdn.microsoft.com/en-us/library/ms724385%28v=vs.85%29.aspx>to
look for|SM_MAXIMUMTOUCHES|settings.

*SM_MAXIMUMTOUCHES*
95



Nonzero if there are digitizers in the system; otherwise, 0.

SM_MAXIMUMTOUCHES returns the aggregate maximum of the maximum number of
contacts supported by every digitizer in the system. If the system has
only single-touch digitizers, the return value is 1. If the system has
multi-touch digitizers, the return value is the number of simultaneous
contacts the hardware can provide.

*Windows Server 2008, Windows Vista, and Windows XP/2000: *This value is
not supported.


According to
https://msdn.microsoft.com/en-us/library/windows/desktop/ms700675(v=vs.85).aspx
you can use SM_TABLETPC with GetSystemMetrics to determine if the PC is
a tablet or something else<g>

*SM_TABLETPC*
86



Nonzero if the current operating system is the Windows XP Tablet PC
edition or if the current operating system is Windows Vista or Windows 7
and the Tablet PC Input service is started; otherwise, 0. The
SM_DIGITIZER setting indicates the type of digitizer input supported by
a device running Windows 7 or Windows Server 2008 R2. For more
information, see Remarks.

Hope this helps:)

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
06-20-2015, 07:17 AM
Hi Arnor,

I have tried that and no joy.

In my testing SM_MAXIMUMTOUCHES returns: xp = 0, win7 = 1, win 8.1 (vm on
desktop) = 8, win 8.1 tablet= 5, and win10 (vm on desktop)= 8. I also tried
SM_DIGITIZER which returns: xp=0,win7=0; win8.1 = 193. win 8.1 tablet = 193,
and win10 = 193.

SV uses a check of <> 0 for MAXIMUMTOUCHES to indicate if the OSK should be
popped up or not. It always pops up all except OSs that I have tried except
xp.

For testing, I am now using SM_TABLETPC (which MSDN also recommends<g>) and
that is closer. At least xp and win7 return 0 where all the rest of the
above return 1. I am wondering if vmware is confusing the issue with
SM_TABLETPC. I don't have an 8.1 or win10 native desktop that I can try it
on.

Ill keep a lookin'.

Skip

NewsArchive
06-20-2015, 07:17 AM
Hi Skip,

> I have tried that and no joy.

Is there a touch sample in C10 somewhere? I haven't tried this at all.

Best regards,

--
Arnor Baldvinsson - Icetips Alta LLC

NewsArchive
06-20-2015, 07:18 AM
Hi Skip,

Very good question. I'll have to do some research on this.

Friedrich

NewsArchive
06-23-2015, 02:11 AM
Thanks, Friedrich!

At least we know some things that don't work (see above) <g>

Skip

NewsArchive
06-23-2015, 02:11 AM
>
> At least we know some things that don't work (see above) <g>
>

<g>

I think I have found a solution to detect a tablet. I'll make a test
version available soon.

Friedrich

NewsArchive
06-23-2015, 02:11 AM
That was quick!!! Can you pass that along to Diego?

I have a rinky-dink little win 8.1 tablet here that I could test it.

Skip

NewsArchive
06-23-2015, 02:12 AM
I posted an example that might be the ticket on the C10 group.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

Source code is like a joke.
If you have to explain it, then it's not funny.

NewsArchive
06-23-2015, 07:01 AM
Hi Skip,

> I have a rinky-dink little win 8.1 tablet here that I could test it.

It's not trivial to handle it and perhaps its even impossible to reliably do
it (shame on you M$).

What does the following SetupBuilder compiled app display on your system(s)
(it is "asInvoker" manifested and code-signed).

http://www.lindersoft.com/projects/IsTouch.exe

It returns 0 on all of my non-touch-enabled machines and >0 on my touch
devices.

Friedrich

--
Friedrich Linder
Lindersoft | SetupBuilder | www.lindersoft.com
954.252.3910 (within US) | +1.954.252.3910 (outside US)

--SetupBuilder "point. click. ship"
--Helping You Build Better Installations
--Create Windows 10 ready installations in minutes
--Official COMODO Code Signing and SSL Certificate Partner

NewsArchive
06-23-2015, 11:39 AM
Here's the response I had to your post in C10 group.

Also attaching the test program.

Hi Friedrich -

If I put this in my .vmx:

touchscreen.vusb.present = "TRUE"

Then run WIndows 10, your IsTouch shows 1 as does my test app.

The problem is that this setting is turned on for currently unknown
reasons, even if there is no touch device on the host machine.

My VM didn't have it turned on before, but Lee's did (and it shouldn't
have).

When I subsequently turned OFF the setting, then both your app and
mine show no touch.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

Source code is like a joke.
If you have to explain it, then it's not funny.

NewsArchive
06-24-2015, 02:24 AM
Hi Jeff,

I have tested it in three different Win10 VMs. It always showed "0". I do
not have any "touchscreen.vusb.present" item in my .vmx.

But I think there is (under certain circumstances) a problem with the VMWare
installer in Windows 8 and later. VMWare users already reported this issue
in 2012:

https://communities.vmware.com/thread/418278

So IMO, your code and the method used in the SetupBuilder runtime seem to be
working fine :-) I have received test results from 22 users.

Friedrich

NewsArchive
06-24-2015, 08:15 AM
Thanks a lot, Friedrich.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

Source code is like a joke.
If you have to explain it, then it's not funny.

NewsArchive
06-24-2015, 08:15 AM
Thank YOU, Jeff !!!

Friedrich