Live reporting of window moving?
-
- Enthusiast
- Posts: 429
- Joined: Sun Apr 06, 2008 12:54 pm
- Location: Brisbane, Qld, Australia
- Contact:
Live reporting of window moving?
If I monitor the event #PB_Event_MoveWindow then this fires only when the window move has finished, ie when the user releases the mouse button. Is it possible to get live or continuous notifications as the window is moved? Can I do this by checking something in a window callback?
Re: Live reporting of window moving?
v5.30
Or use SetWindowCallBack().- Changed: #PB_Event_SizeWindow and #PB_Event_MoveWindow are no more realtime on Windows, use BindEvent() to get real time update. It should fixes ugly flickering when realtime resizing on Windows.
Last edited by skywalk on Fri Oct 24, 2014 2:06 am, edited 1 time in total.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: Live reporting of window moving?
Code: Select all
Procedure MoveWndEvent()
WinID = EventWindow()
Debug "xPos: "+ WindowX(WinID)
Debug "yPos: "+ WindowY(WinID)
EndProcedure
OpenWindow(1,200,200,200,200,"Test",#PB_Window_ScreenCentered|#PB_Window_SizeGadget|#PB_Window_SystemMenu)
WindowBounds(1,200,200,200,200)
BindEvent(#PB_Event_MoveWindow ,@MoveWndEvent(), 1)
Repeat
Event = WaitWindowEvent(50)
Event_Gadget = EventGadget()
Until Event = #PB_Event_CloseWindow
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
-
- Enthusiast
- Posts: 429
- Joined: Sun Apr 06, 2008 12:54 pm
- Location: Brisbane, Qld, Australia
- Contact:
Re: Live reporting of window moving?
Many thanks. That's perfect. I'll have to learn a bit more about BindEvent()!