1. Daniel Vivier
  2. PowerBuilder
  3. Saturday, 18 January 2020 20:24 PM UTC

It seems that for Response type windows, MinBox is greyed out and even if it appears checked, there is never a minimize control on the window.

Is there some API way perhaps to override this? The tricky part would be that if the response window was minimized, really all windows it popped up up from (which could be more than 1, in a sequence of Main, then Response, then Response ...) should be minimized. And when the app was then restored from the taskbar, the windows would all have to come back the way they were.

Thanks.

David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Monday, 20 January 2020 15:11 PM UTC
  2. PowerBuilder
  3. # 1

Here's a random thought, add your own minimise button and set the window state to minimised in that?

No idea if that will work, but if it does then all you need to do is make it look logical to the user.

Comment
  1. Daniel Vivier
  2. Monday, 20 January 2020 15:26 PM UTC
That does work, but it leaves the main window from which this was opened still unminimized, which is not what the user who requested this wanted - they wanted all of the app to be minimized. Also, of course, doing it this way would be a very non-standard UI, and would only make sense if this was an absolute requirement, rather than one user's "nice to have" wish. Thanks for the idea though!
  1. Helpful
  1. David Peace (Powersoft)
  2. Monday, 20 January 2020 17:25 PM UTC
Yes the UI aspect would be a problem, but I suppose you could call back to the parentwindow and minimise that reccursively.... Probably not worth the bother :)
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Saturday, 18 January 2020 21:18 PM UTC
  2. PowerBuilder
  3. # 2

You should be able to change the window style using GetWindowLong & SetWindowLong API functions.

Comment
  1. Daniel Vivier
  2. Saturday, 18 January 2020 21:48 PM UTC
Thanks. I looked into that, and realized I already had some code (I think from you Roland) for setting a response window to be resizable, which works great. That code didn't add the WS_MINIMIZEBOX style, so I tried adding that. While doing so made the minimize control appear (not greyed out), clicking on that control did nothing. I think I should probably give up on this, the user can certainly live without it.
  1. Helpful
  1. Michael Kramer
  2. Saturday, 18 January 2020 22:22 PM UTC
I think that is a wise decision.

Response window is process modal so minimize is a pretty "brutal" action. EX: User can't close the MDI Frame because (despite minimized) the response still "owns" app process' main thread - which is the purpose of Response window vs. the other window types. Perhaps consider popup window if you need free floating dialogue without blocking main thread.
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Saturday, 18 January 2020 20:42 PM UTC
  2. PowerBuilder
  3. # 3

It really does not make any sense to be able to minimize a response window because NO other action can occur until the window has been provided a response by the user. i.e. the application is locked until the user responds.

I suppose one could make the argument that on a platform with multiple application running concurrently it MIGHT mae some sense to minimize the response window while the user deals with other apps during the time this application is locked, but even then the other apps will be placed on TOP of the display stack

Bottom line: if you need user controls on a dialog box, don't use a Response window.


JMHO,

Olan

Comment
  1. Daniel Vivier
  2. Saturday, 18 January 2020 21:12 PM UTC
The exact reason I'm asking this is a user request to be able to minimize the entire app to get some data from a different app then come back. Yes, I know there are other ways to switch apps but for many users minimizing to get the current app out of the way first is the most obvious way.

Really response window is the only reasonable choice for many uses, so saying "don't use a response window" unfortunately won't work.
  1. Helpful
  1. Olan Knight
  2. Sunday, 19 January 2020 00:08 AM UTC
That's what I suspected when you made this post. Michael said what I was trying to, ony he said it much better!



Good Luck,

Olan
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.