|Title: How to detect if a computer has more than one monitor and use any of them?|
These days you often find end users to have more than one monitor for one reason or another.
If you need your application to leverage all the monitor space available on many monitors instead of just crunching all the windows on a single default monitor you may use the C$MONITOR library routine.
One of the main usages of that library routine is to tell you how many monitors your application has available to use.
CALL "C$MONITOR" USING CMONITOR-GET-NO-MONITOR monitorCount [mainMonitor] GIVING returnCode
Then your display window statements may indicate on which monitor you want to create that window.
display standard window background-low screen line 41 screen column 91 screen-index ws-scr-index ... title "Screen" handle window-handle .
Furthermore, you may get detailed information of the monitor you want to use, in order to know the size of it to position your window on a specific place for instance.
CALL "C$MONITOR" USING CMONITOR-GET-MONITOR-INFO monitorIndex CMONITOR-DATA GIVING returnCode
Furthermore, you may get detailed information of the monitor you want to use, in order to know the size of it to position your window on a specific place for instance.You may download the following sample program that demonstrates both functions of the C$MONITOR library routine. Compile it like this:
iscc -sp="%iscobol%sampleisdef" monitortest.cblRun it like this:
|Authored by: Veryant Support on Tue, Feb 12th, 2019 at 7:00 PM
This question has been viewed 2083 times so far.
|Online URL: http://support.veryant.com/support/phpkb/question.php?ID=298|
Powered by PHPKB Knowledge Base Software