Page 1 of 1
Retrieve All #PB_Event_SizeWindow Events during Resize
Posted: Sat Feb 25, 2023 8:17 pm
by Dr Soong
I realize that #
PB_Event_SizeWindow was corrected via
viewtopic.php?f=24&t=66074 to only send a single event upon completion of the window resize (at least on the Windows side).
But, is there a parameter or technique that can be used to send all resize events immediately (as long as the mouse button is pressed) as the user performs the resize?
I am attempting to dynamically reformat my window contents as the user drags the mouse. But as it currently functions, I have been unable to find a technique to easily accomplish this.
Is there something I am missing? It seems like this would be a useful behavior for some users.
Re: Retrieve All #PB_Event_SizeWindow Events during Resize
Posted: Sat Feb 25, 2023 8:27 pm
by RASHAD
Code: Select all
Procedure sizeCB()
Static number
number + 1: Debug "resize event number " + Str(number)
Debug "------------------"
EndProcedure
OpenWindow(0, 0, 0, 600, 100, "resize window please", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
BindEvent(#PB_Event_SizeWindow,@sizeCB())
Repeat
Event = WaitWindowEvent(10)
Until Event = #PB_Event_CloseWindow
Re: Retrieve All #PB_Event_SizeWindow Events during Resize
Posted: Sat Feb 25, 2023 10:42 pm
by Dr Soong
Thanks for your reply, Rashad. But on my system (Windows 10) using your code, the resize behaves as defined - not as I want.
That is, I recieve a single event notification upon Mouse Button Up after the resize - not many events during the Mouse-Button-Down-Drag-Resize operation. Those are the events I am trying to capture.
On your system, are you seeing many dozens of events generated for a resize, or just a single event? I'm trying to get the many dozens of events.
Re: Retrieve All #PB_Event_SizeWindow Events during Resize
Posted: Sat Feb 25, 2023 10:52 pm
by RASHAD
PB 6.xx x86 Windows 11 x64
Many events while mouse is down and resizing
Just tested it with VMware Windows 10 x64 PB 6.xx x86 and the results is the same as before
Re: Retrieve All #PB_Event_SizeWindow Events during Resize
Posted: Sat Feb 25, 2023 11:10 pm
by Dr Soong
Interesting... We're seeing different results.
Here's what I see after I have resized the initial box to musch smaller.
By making the box much smaller, I would have expected many events. But I only get one.
I wonder if there is a setting I have turned on somewhere in my system.
Re: Retrieve All #PB_Event_SizeWindow Events during Resize
Posted: Sat Feb 25, 2023 11:12 pm
by Dr Soong
Looks like the Image did not come across. Myabe a raw link will
https://drive.google.com/file/d/1dfnVvI ... share_link
Re: Retrieve All #PB_Event_SizeWindow Events during Resize
Posted: Sat Feb 25, 2023 11:13 pm
by AZJIO
Re: Retrieve All #PB_Event_SizeWindow Events during Resize
Posted: Sat Feb 25, 2023 11:21 pm
by Dr Soong
Thanks AZJIO, but I'm seeing the same behavior. The window reformat only takes place upon mouse-up. During the drag, I see an outline of the expanding window-box perimeter, but none of the interior content is reconfigured until I release the mouse button.
Re: Retrieve All #PB_Event_SizeWindow Events during Resize
Posted: Sat Feb 25, 2023 11:25 pm
by AZJIO
System Properties -> Performance Options -> "Show window contents while dragging"
I don't know if you can guess from the
screenshot
found
Re: Retrieve All #PB_Event_SizeWindow Events during Resize
Posted: Sat Feb 25, 2023 11:43 pm
by Dr Soong
That was it, AZJIO!!!
I had no idea that setting even existed on Windows. But I will definitley write down the process to find it.
After setting the checkbox, I went back to both your program, and the one given to me by Rashad, and they all performed as I would want them to. Now I just have to see if I can get my own program to work.
Thank you both for your help!
Re: Retrieve All #PB_Event_SizeWindow Events during Resize [Solved]
Posted: Sat Feb 25, 2023 11:47 pm
by Dr Soong
For future referencers of this question, here is the path to find the "Show window contents while dragging" checkbox on Windows:
1. Open the Start menu;
2. Right-click Computer (or "This PC") → Properties;
3. Click Advanced system settings;
4. Click Performance → Settings;
5. Enable "Show window contents while dragging" and press OK: