Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #10956
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Show(Shownormal) not working on 2nd monitor |
| Date | 2017-09-08 13:03 +0200 |
| Message-ID | <f1fbp6FadmnU1@mid.individual.net> (permalink) |
| References | <6rh0qc5a3s8rnt6jtv41fsdhlugkorsq39@4ax.com> |
Hi Dick, > SELF:Show(SHOWNORMAL) > PrintReport(.....) > SELF:Show(SHOWZOOMED) > SELF:SetFocus() > > This works - however for one client using Remote Desktop on 2 monitors > it only works on the primary monitor. On the second monitor the > windows keeps the maximized size (and the print hangs) but it can be > done manually. On my 2 monitors it works for both from the program. > > Does anyone have an idea why SELF:Show(SHOWNORMAL) could fail on a > secondairy monitor? I never had the need to distinguish between a primary and second monitor, but a search using the keywords "SHOWNORMAL api secondary monitor" gave some hints: 1. ShowWindow() isn“t designed to support a primary monitor. 2. But - from my understanding - you might try these steps: // get number of attached monitors nNumbers := GetSystemMetrics(SM_CMONITORS) // if nNumbers > 1 detect the monitor the window is shown. hMonitor := MonitorFromWindow( <yourwindowhandle>, MONITOR_DEFAULTTONEAREST ) tmi := TAGMONITORINFO tmi.Sizeof ( _sizeof ( TAGMONITORINFO ) ) GetMonitorInfo( hmonitor, @tmi) study the results the tmi structure returns and use a SetWindowPos() call instead of ShowWindow() to position <YourWindowHandle> regards Karl-Heinz
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Show(Shownormal) not working on 2nd monitor D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2017-08-25 18:02 +0200
Re: Show(Shownormal) not working on 2nd monitor "Karl-Heinz" <invalid@invalid.invalid> - 2017-09-08 13:03 +0200
Re: Show(Shownormal) not working on 2nd monitor "Karl-Heinz" <invalid@invalid.invalid> - 2017-09-08 13:08 +0200
Re: Show(Shownormal) not working on 2nd monitor D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2017-09-08 17:47 +0200
Re: Show(Shownormal) not working on 2nd monitor Glenn Keeler <glennkeeler@shaw.ca> - 2017-09-08 08:59 -0700
Re: Show(Shownormal) not working on 2nd monitor "Karl-Heinz" <invalid@invalid.invalid> - 2017-09-08 19:27 +0200
csiph-web