Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #10941 > unrolled thread
| Started by | D.J.W. van Kooten <vankooten@removethis.ic2.com> |
|---|---|
| First post | 2017-08-25 18:02 +0200 |
| Last post | 2017-09-08 19:27 +0200 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
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
| From | D.J.W. van Kooten <vankooten@removethis.ic2.com> |
|---|---|
| Date | 2017-08-25 18:02 +0200 |
| Subject | Show(Shownormal) not working on 2nd monitor |
| Message-ID | <6rh0qc5a3s8rnt6jtv41fsdhlugkorsq39@4ax.com> |
For some of our clients when printing a multipage invoice (Report Pro 2.16) the program does not do anything (regardles the destination, so also PDF or screen). Accidentaly we discovered that as soon as we clicked on the upper right window icon to bring back the child shell window from maximized (within the main shell) to "normal" it continues the print - even when you minimize during the print attempt. So we programmed a trick: 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? Dick
[toc] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-09-08 13:03 +0200 |
| Message-ID | <f1fbp6FadmnU1@mid.individual.net> |
| In reply to | #10941 |
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
[toc] | [prev] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-09-08 13:08 +0200 |
| Message-ID | <f1fc21FafjcU1@mid.individual.net> |
| In reply to | #10956 |
Hi Dick > 1. ShowWindow() isn´t designed to support a primary monitor. upps - should be of course: 1. ShowWindow() isn´t designed to support a *secondary* monitor. regards Karl-Heinz
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <vankooten@removethis.ic2.com> |
|---|---|
| Date | 2017-09-08 17:47 +0200 |
| Message-ID | <fie5rc52rcu613mssoeioe26dffcqvo9ol@4ax.com> |
| In reply to | #10956 |
Replying on message of Fri, 8 Sep 2017 13:03:22 +0200 from Karl-Heinz: Hello Karl-Heinz, >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 secundairy monitor. Not sure where you found it but it explains a lot; thanks for that. It seems that it could work but can fail was well. I'll make a note in my code with your code suggestion below. This specific client is one out of I think 2 where ReportPro hangs when it should print a multipage report -UNLESS I show the window normal size. Even until - the user can get ReportPro continuing again clicking the icon for it herself! That is not normal anyway but solved by programming Shownormal. I've told her to use her primary monitor for invoicing but if it happens more often I will apply the changes. These are proofs that VO is aging….see also the 4K monitor question below. Dick
[toc] | [prev] | [next] | [standalone]
| From | Glenn Keeler <glennkeeler@shaw.ca> |
|---|---|
| Date | 2017-09-08 08:59 -0700 |
| Message-ID | <6bd92d6e-8473-4430-8c2c-5425d314a9dd@googlegroups.com> |
| In reply to | #10959 |
On Friday, 8 September 2017 09:47:15 UTC-6, D.J.W. van Kooten wrote: > >1. ShowWindow() isn´t designed to support a secundairy monitor. As an interim solution, you could have WinSplitRevolution or something similar installed on the client machine and then configure it to place the particular windows on the secondary monitor. Or, for that matter, Autohotkey could be used to detect and bring forward the ReportPro window.
[toc] | [prev] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-09-08 19:27 +0200 |
| Message-ID | <f1g28gFfke9U2@mid.individual.net> |
| In reply to | #10959 |
Hi Dick > >1. ShowWindow() isn´t designed to support a secundairy monitor. > > Not sure where you found it but it explains a lot; thanks for that. It > seems that it could work but can fail was well. i don´t find the link again. But it was a VIP or person from MS who wrote that. ShowWindow() isn´t designed for a secondary monitor, that's why it works randomly only ... regards Karl-Heinz
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web