1. Christopher Craft
  2. PowerBuilder
  3. Tuesday, 29 March 2022 23:43 PM UTC

PowerBuilder 2019 R3 2728

How can you prevent a window from Minimizing? I was hoping to trap it in Resize with a return code but that does not work.

Chris Craft

John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 30 March 2022 03:02 AM UTC
  2. PowerBuilder
  3. # 1

Un-checking the "MinBox" window property in the Window Painter, or setting the MinBox property to False in code appears to do the trick, or do you have special conditions/examples?

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 30 March 2022 15:13 PM UTC
Hi Chris ... yes, PowerScript code still has full control even of the Minimize CBX is disabled or not visible. However, PowerScript code can also prevent this via the Resize event too. ;-)
  1. Helpful
  1. John Fauss
  2. Wednesday, 30 March 2022 16:46 PM UTC
Well, I rationally assumed that if a developer did not want a window to be minimized, the developer would simply not include code that sets the WindowState to Minimized! --- Silly me. From the way your question was worded, Christopher, I believed you were asking how to prevent The User from minimizing a window, not a developer. This leads me to wonder how, in general, one prevents development team members from submitting code that goes against user interface guidelines or protocols. We use peer reviews on source code deltas before any new or modified code is approved.
  1. Helpful
  1. Christopher Craft
  2. Wednesday, 30 March 2022 21:26 PM UTC
Had a feeling this was coming...So, our application has to support 2 modes. The 'Classic' version which is the standard looking windows, and the new Ribbon with Theme version - which is designed to look like a web-based interface (all windows take the full MDI Client area). All of this is handled in the my framework code. So, we have scenarios where a window will minimize to put focus back on the original window but in the ribbon UI I don't want this to happen. Trying to prevent it in the base object so I don't need to go back to all those places that have it coded.
  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.