Prev: Exchange
Next: OLEAutoObject question
From: John Martens on 1 Apr 2010 13:25 You could experiment with the GetSystemMetrics( parameters to find the resolution of the primary screen and the secondary screen. Something like this: Dimension{GetSystemMetrics(SM_CXVIRTUALSCREEN),GetSystemMetrics(SM_CYVIRTUALSCREEN)} vs Dimension{GetSystemMetrics(SM_CXSCREEN),GetSystemMetrics(SM_CYSCREEN)} The problem will be that the first one will give you the bounding box of the two screens together. It is not easy to know if the low res monitor is in Windows setting left, right, on top or on bottom of the primary one. The other problem is that you will have the bouding box so: -------------------- | | | | | primary |------------- | | secondary | | | | --------------------------------- The primary is eg 100x40 and the seconday is 80x20 the bounding box will be 180x40 !! Calculating it like Steve suggested will not work in this case. Wouldt it be better to let the user move a settings window to the low-res monitor, size it and then store the origin and size. When displaying the 'real' window: et the stored parameters and display it like Steve suggested. Cheers, John Op 1-4-2010 16:02, Stephen Quinn schreef: > Richard > >> Any idea how to open the window maximized on the extended monitor. > > Simple math > > Monitor2Top := 0 > Monitor2Left := ( TotalWidth2Monitors - WidthMonitor1 ) + 1 > // Plug the values into the window co-ords // Check the syntax<g> > oWindow:Origin := Point{ Monitor2Top, Monitor2Left } > oWindow:Size := // I'll leave you to work this one out<bg> > oWindow:Show() > > CYA > Steve > >
From: Geoff Schaller on 1 Apr 2010 19:19 Richard. Sorry but it is true. When you extend your desktop you have ONE desk top and it has a net total width. Resolutions are irrelevant. You will need to use GetSystemMetrics() to determine original resolutions and the 'subsequent' monitor - because you could have 'n' monitors. You are going to have to delve into the related APIs but you should let the user do this. Let them position and choose full screen themselves. One of THE WORST things I find developers do is open their apps full screen. This is so arrogant and inconvenient. Open your app to a reasonable size and let the user decide where it is going to go and how. You can easily store all these choices and then open the app that way in the future - you can even store it for every window. This is no big deal. And it can remember where in the extended desk top it was opened. If you are not using extended desktop then you're on your own <g>. Geoff "Geoff Schaller" <geoffx(a)softxwareobjectives.com.au> wrote in message news:FZXsn.16514$pv.8413(a)news-server.bigpond.net.au: > Yes, just get the width of the screen. > > GetSystemMetrics( SM_CXFULLSCREEN ) > > > It will be double the single width in pixels > > > Geoff > > > > "Richard Pilkington" <richardp(a)lukhozi.co.za> wrote in message > news:hp1fak$5uo$1(a)adenine.netfront.net: > > > > Hi All > > > > I need to be able to detect if the computer mu application is operating on has > > an extended desktop on another monitor or data projector. I would like to open > > a window on the extended monitor and maximize it there. > > > > Has anyone got any suggestions or clues for me. > > > > Thanks > > > > Richard > > > > --- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: Fabrice Foray on 2 Apr 2010 12:41 Hi Richard, may I suggest to have a look here : http://msdn.microsoft.com/en-us/library/dd145072 and also there, for a sample, that should address your problem. http://msdn.microsoft.com/en-us/library/dd162826 HTH, Fab On 1 avr, 08:43, Richard Pilkington <richa...(a)lukhozi.co.za> wrote: > Hi All > > I need to be able to detect if the computer mu application is operating on has > an extended desktop on another monitor or data projector. I would like to open > a window on the extended monitor and maximize it there. > > Has anyone got any suggestions or clues for me. > > Thanks > > Richard > > --- news://freenews.netfront.net/ - complaints: n...(a)netfront.net ---
From: richard.townsendrose on 5 Apr 2010 09:00 Richard hmmmmm .. . when i do demos, then i use the [mostly client supplied] projector. i find it best experiment with each - it can take 30 mins to get squared away properly - becuase some of them have are just such weird configurations ... richard
From: Richard Pilkington on 6 Apr 2010 02:31
Sorry Been away for a couple of days Thank you to Geoff, Amilcar, Fabrice, John and Steve. From your posts I have enough to begin working on a solution. @Geoff. The solution I am working on is for a scoreboard. When the projector is attached and the user has extended his desktop to use for the scoreboard he wants me to detect this and display the scoreboard on it when he clicks on the Display Scoreboard button. The application still displays on the primary display so that score can be input while the scoreboard is displayed without the public seeing anything but the scoreboard. In this case it is not arrogant or inconvenient, but what the user requested. If the desktop is not extended the scoreboard will be displayed in a normal window on the primary display where the user can maximize it as he wishes. @Amilcar. Are the functions referenced in the win32 library in VO (VO 2.7b) or do I have to create the _DLL function pointers. If I have to create the pointers can you help me with them. Thanks again for help offered so far. Richard On 05/04/2010 15:00, richard.townsendrose wrote: > Richard > > hmmmmm .. . when i do demos, then i use the [mostly client supplied] > projector. i find it best experiment with each - it can take 30 mins > to get squared away properly - becuase some of them have are just such > weird configurations ... > > richard --- news://freenews.netfront.net/ - complaints: news(a)netfront.net --- |