Hi all
I need to determine the numbers of monitor in PB. There are already some examples but not in PB code. Do you have any examples how I can determine the number of connected monitors?
Or other function about monitor!
Thx
André Rust
Hi all
I need to determine the numbers of monitor in PB. There are already some examples but not in PB code. Do you have any examples how I can determine the number of connected monitors?
Or other function about monitor!
Thx
André Rust
Hi André;
FYI ... from my STD framework's example order entry App :
Regards ... Chris
Here is some Windows API info specific to multiple monitors.
Multiple Display Monitors Reference
If you are wanting some other or additional information, you'll need to be more specific as to what you looking for.
Here's the WINAPI list of functions for dealing with monitors.
Microsoft Monitor Configuration Functions
The Windows API GetSystemMetrics will tell you the number of display monitors if you supply an argument value of 80 (SM_CMONITORS).
Define the following local external function in the Window or User object from which you want to call this WinAPI:
FUNCTION Integer GetSystemMetrics(Integer nIndex) LIBRARY "user32.dll"
Once the function definition has been saved in your object, you invoke it via this example code:
Integer li_num_monitors
li_num_monitors = GetSystemMetrics(80) // 80 = SM_CMONITORS, # of monitors.
There is no built-in function in PowerBuilder to do this. You would need to tap into Windows APIs. Not sure which Windows API can accomplish this, but hopefully I have nudged you in the right direction.