Christian,
>Does anybody knows a way, using Windows messages or else, to detect if the
a application is running on a normal screen with a keyboard or if it's
running on a touchscreen?
>
>The reason is that in a case of a touchscreen, I would make some
components bigger, 'cause my buttons would be too small to click with
fingers.
One way to do this would be to check driver names for the monitor.
Since there are a lot of touchscreen monitors, it would not be reliable.
Another way that we use when we need the software to discriminate
the hardware setup and there is no direct way to do it is to make up
an environment variable. You would then add that variable to the
environment of the machines with the hardware.
For example:
MONITOR=TOUCHSCREEN
Your program can then check to see if the value of the environment
variable MONITOR is TOUCHSCREEN and take appropriate action.
Another way to do this is a local INI file. The registry is also an
option, but we try to use INI files instead of the registry, but that
is another subject.
Glenn Lawler
www.incodesystems.com
.