Prev: Exchange
Next: OLEAutoObject question
From: John Martens on 6 Apr 2010 07:08 As you describe I would let the user position the scoreboard one, store the setting and then re-use it for the lifetime oof the projector. It's simple, gives the user hardly any work but complete control. I'm doing the same with a window that is specially for showing planned matches, matches that are on court and matches that have been played. This process runns on a separate PC that id mainly used for that purpose. While running in a loop it uploads the tournament progress once in a while to the Internet. John Op 6-4-2010 8:31, Richard Pilkington schreef: > 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 ---
From: Amilcar A. Camargo on 6 Apr 2010 14:15 Hi Richard, On Tue, 06 Apr 2010 08:31:32 +0200, Richard Pilkington <richardp(a)lukhozi.co.za> wrote: >Sorry > >Been away for a couple of days > >@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. I don't think they're listed there. You can use the following prototype for Enumerate display monitors: _DLL FUNCTION EnumDisplayMonitors( ; hDC AS PTR, ; // HDC handle for your app lprcClip AS PTR, ; // clipping rectangle (option) lpfnEnum AS PTR, ; // callback function to enumerate dwData AS DWORD ; // Private data passed to callback function ) AS LOGIC PASCAL:User32.EnumDisplayMonitors I haven't used this function but, from top of mind, something like this could do: STATIC GLOBAL hMonitor AS PTR // Your monitor handle FUNCTION FindMyMonitor( oShell AS Window ) AS PTR PASCAL // Finds the monitor handle where <oShell> is displayed LOCAL hHDC AS PTR hMonitor := NULL_PTR // start clean hHDC := GetDC( oShell:Handle() ) // Get window DC IF hHDC <> NULL_PTR EnumDisplayMonitors( hHDC, NULL_PTR, @EnumMonitorsProc(), 0u ) ENDIF RETURN hMonitor STATIC FUNCTION EnumMonitorsProc( ; hHandle AS PTR, ; hHDC AS PTR, ; pRect AS PTR, ; dwData AS DWORD ; ) AS LOGIC _WINCALL // Callback function for EnumDisplayMonitors() IF hHandle <> NULL_PTR hMonitor := hHandle ENDIF RETURN TRUE HTH, Amilcar A. Camargo F. Guatemala, C. A.
From: Richard Pilkington on 7 Apr 2010 02:41
Amilcar Thank you very much for that. You have been very helpful (as always in this forum). Richard On 06/04/2010 20:15, Amilcar A. Camargo wrote: > Hi Richard, > > I don't think they're listed there. You can use the following prototype for > Enumerate display monitors: > > _DLL FUNCTION EnumDisplayMonitors( ; > hDC AS PTR, ; // HDC handle for your app > lprcClip AS PTR, ; // clipping rectangle (option) > lpfnEnum AS PTR, ; // callback function to enumerate > dwData AS DWORD ; // Private data passed to callback function > ) AS LOGIC PASCAL:User32.EnumDisplayMonitors > > I haven't used this function but, from top of mind, something like this could > do: > > STATIC GLOBAL hMonitor AS PTR // Your monitor handle > > FUNCTION FindMyMonitor( oShell AS Window ) AS PTR PASCAL > // Finds the monitor handle where<oShell> is displayed > LOCAL hHDC AS PTR > > hMonitor := NULL_PTR // start clean > hHDC := GetDC( oShell:Handle() ) // Get window DC > IF hHDC<> NULL_PTR > EnumDisplayMonitors( hHDC, NULL_PTR, @EnumMonitorsProc(), 0u ) > ENDIF > > RETURN hMonitor > > STATIC FUNCTION EnumMonitorsProc( ; > hHandle AS PTR, ; > hHDC AS PTR, ; > pRect AS PTR, ; > dwData AS DWORD ; > ) AS LOGIC _WINCALL > // Callback function for EnumDisplayMonitors() > > IF hHandle<> NULL_PTR > hMonitor := hHandle > ENDIF > > RETURN TRUE > > HTH, > Amilcar A. Camargo F. > Guatemala, C. A. --- news://freenews.netfront.net/ - complaints: news(a)netfront.net --- |