Type of computer/monitor

Post Reply
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Type of computer/monitor

Post by Natter »

Hi,

Is it possible to determine the type of computer on which my application is running - PC or laptop?
If it is a PC, then you can determine the tim of the monitor - sensor or not?
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Type of computer/monitor

Post by Jimmy »

hi,
Natter wrote:Is it possible to determine the type of computer on which my application is running - PC or laptop?
If it is a PC, then you can determine the tim of the monitor - sensor or not?
you can use WMI and Win32_DesktopMonitor/MonitorType to find out if MonitorType = LCD it is a Laptop

to find Tim of Monitor try https://learn.microsoft.com/en-us/windo ... ysettingsa
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Type of computer/monitor

Post by nageswaragunupudi »

Some of the useful functions in FWH:

Code: Select all | Expand

FW_IsTouchScreen()
FW_IsMousePresent()
FW_IsTabletMode()
ScreenSize( [lInches] ) --> Screen Diameter in MM or Inches
We may try:

Code: Select all | Expand

if FW_IsTouchScreen() .and. !FW_IsMousePresent() .and. ;
   FW_IsTabletMode() .and. ScreenSize( .t. ) <= 10
? "tablet"
endif
Regards

G. N. Rao.
Hyderabad, India
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Type of computer/monitor

Post by Natter »

Rao, Jimmy, thank you for your help!
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Type of computer/monitor

Post by nageswaragunupudi »

Also try

Code: Select all | Expand

GetSystemMetrics(SM_TABLETPC)
Right now, I don't have tablet PC with me to test.
You can provide your feedback.

Soon, we will try to add more functions about pen
Regards

G. N. Rao.
Hyderabad, India
Post Reply