🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13075

Re: Number of monitors?

#13075
From: Remy Lebeau (TeamB)
Date: Sat, 25 Oct 2003 20:26
21 lines
1795 bytes
"vERUs" <-verus-@telia.com> wrote in message
news:3f9a3fab$1@newsgroups.borland.com...

> I'm using TScreen to determine the number of monitors enabled
> on my system but if I remove or add a monitor while my
> program is running the MonitorCount property of TScreen is
> not updated.

Certain features of TScreen are only updated during initial construction,
such as the Monitors array, and TScreen does not update itself automatically
during the lifetime of the application.  You'll just have to resort to using
the Win32 API directly for what you ask, specifically EnumDisplayMonitors()
or GetSystemMetrics(SM_CMONITORS).

Alternatively, the only time the TScreen::Monitors array is ever updated is
when querying the TCustomForm::Monitor property after a change has occured
to invalidate the current array, in which case the array is reinitialized.


Gambit
Technical Details
Message-ID: <3f9adbe1$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f9a3fab$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,84dd79e1e7b94026
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-25 13:39:12 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f9a3fab$1@newsgroups.borland.com>
Subject: Re: Number of monitors?
Date: Sat, 25 Oct 2003 13:26:39 -0700
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.137.75
Message-ID: <3f9adbe1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1067113441 67.22.137.75 (25 Oct 2003 13:24:01 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail