Type of computer/monitor

Type of computer/monitor

Postby Natter » Sat Aug 03, 2024 6:24 am

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?
Natter
 
Posts: 1221
Joined: Mon May 14, 2007 9:49 am

Re: Type of computer/monitor

Postby Jimmy » Sat Aug 03, 2024 9:17 am

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/windows/win32/api/winuser/nf-winuser-changedisplaysettingsa
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Type of computer/monitor

Postby nageswaragunupudi » Sat Aug 03, 2024 9:35 am

Some of the useful functions in FWH:
Code: Select all  Expand view
FW_IsTouchScreen()
FW_IsMousePresent()
FW_IsTabletMode()
ScreenSize( [lInches] ) --> Screen Diameter in MM or Inches


We may try:
Code: Select all  Expand view
if FW_IsTouchScreen() .and. !FW_IsMousePresent() .and. ;
   FW_IsTabletMode() .and. ScreenSize( .t. ) <= 10
? "tablet"
endif
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Type of computer/monitor

Postby Natter » Sat Aug 03, 2024 9:42 am

Rao, Jimmy, thank you for your help!
Natter
 
Posts: 1221
Joined: Mon May 14, 2007 9:49 am

Re: Type of computer/monitor

Postby nageswaragunupudi » Sat Aug 03, 2024 10:23 am

Also try
Code: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 69 guests