support: Customer Portal
Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
 

Veryant Knowledge Base
Home > All Categories > isCOBOL General > User Interface > How to detect if a computer has more than one monitor and use any of them?
Question 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.cbl
Run it like this:
   iscrun MONITORTEST
Authored by: Veryant Support This question has been viewed 306 times so far.
Click Here to View all the questions in User Interface category.
File Attachments File Attachments
How helpful was this article to you?
User Comments User Comments Add Comment
There are no user comments for this question. Be the first to post a comment. Click Here
Related Questions Related Questions
  1. How do I center a window on the desktop?
  2. Does isCOBOL provide GUI design support?
  3. iscobol.font.default and DEFAULT-FONT
  4. What are the specific fonts that isCOBOL uses by default?
  5. Does isCOBOL provide Graph modules to show statistics?
  6. Can I have an entry-field that more or less works the same as Google Search? So I would like to be able to change the contents of the list while the user is typing...
  7. Did you know isCOBOL has the Accordion control?
  8. Is it possible to sort dates in a grid control?
  9. Working with a grid control is there a way to get the double-click event?
  10. How can I refresh the current contents of the paged grid?
  11. Is there a way to show leading zeros when numeric data items are displayed on a character based screen?
  12. How can I show an animated gif with isCOBOL?
  13. Is it possible to configure the color of the read-only entry-fields?
  14. Did you know isCOBOL supports a tip inside the entry-field and combo-box controls when they are empty?
  15. Did you know how to customize color of the borders of some controls?
  16. UNC Paths with Browser Control don't work. What can I do to solve it?
  17. Did you know that you can protect a Grid from editing without coding any event?
Article Information Additional Information
Article Number: 298
Created: 2019-02-12 8:08 AM
Rating: No Rating
 
Article Options Article Options
Print Question Print this Question
Email Question Email Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
Subscribe to Article Subscribe to Article
 
Search Knowledge Base Search Knowledge Base



 
 

© Veryant - All Rights Reserved
Veryant and isCOBOL are trademarks or registered marks of Veryant in the United States and other countries. All other marks are the property of their respective owners.