I would like to see more supported window events, which are recognized by the PB commands WindowEvent() and WaitWindowEvent().
That would be: minimizing, maximizing, resizing + probably more events (don't know at the moment)
At the moment this events could only be catched using a callback + related API commands/constants (see help file example at the SetWindowCallback() command). But this isn't cross-plattform.
Thanks!
(Haven't newer topics about this, so made I new one. It partly according to this old topic: http://www.purebasic.fr/english/viewtop ... t=minimize)
More native support for window events (minimize,maximize...)
-
- Enthusiast
- Posts: 119
- Joined: Tue Feb 21, 2006 12:37 pm
+1
I am dealing with this right now. Which is why I landed in this thread doing a search.
I went to the help file for WindowEvent() to look for the right syntax for catching a minimize event, but found nothing. It would be nice to see the following added:
#PB_Event_MinimizeWindow - the window has been minimized.
#PB_Event_MaximizeWindow - the window has been maximized.
I am dealing with this right now. Which is why I landed in this thread doing a search.
I went to the help file for WindowEvent() to look for the right syntax for catching a minimize event, but found nothing. It would be nice to see the following added:
#PB_Event_MinimizeWindow - the window has been minimized.
#PB_Event_MaximizeWindow - the window has been maximized.
-
- Addict
- Posts: 1073
- Joined: Fri Apr 25, 2003 11:13 pm
- Location: Netherlands
- Contact:
That's correct Edwin.
Just catch the #PB_Event_MoveWindow
then do i.e.
If GetWindowState(#Window)=#PB_Window_Minimize
EndIf
One of my app does that currently, works fine.
And #PB_Event_MoveWindow is only triggered on a move end. (after you let go of it) or when the window is minimized or restored (or maximized as well I guess)
At least there is no need for a callback to handle this anymore
Just catch the #PB_Event_MoveWindow
then do i.e.
If GetWindowState(#Window)=#PB_Window_Minimize
EndIf
One of my app does that currently, works fine.
And #PB_Event_MoveWindow is only triggered on a move end. (after you let go of it) or when the window is minimized or restored (or maximized as well I guess)
At least there is no need for a callback to handle this anymore

- Andre
- PureBasic Team
- Posts: 2137
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Thanks for this great tipp! It's working fine for me too!Rescator wrote:Just catch the #PB_Event_MoveWindow
then do i.e.
If GetWindowState(#Window)=#PB_Window_Minimize
EndIf

Should do also on MacOS / other PB-supported OS.
But a native event support - like suggested from me - should still be done, I think

Nope, won't work on Linux, because this event is just a side-effect of how Windows minimizes a window.Andre wrote:Thanks for this great tipp! It's working fine for me too!![]()
Should do also on MacOS / other PB-supported OS.
But a native event support - like suggested from me - should still be done, I think
I have put this on my list for the next version.
quidquid Latine dictum sit altum videtur