Page 1 of 1
Live reporting of window moving?
Posted: Fri Oct 24, 2014 12:19 am
by ozzie
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?
Posted: Fri Oct 24, 2014 1:01 am
by skywalk
v5.30
- 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.
Or use SetWindowCallBack().
Re: Live reporting of window moving?
Posted: Fri Oct 24, 2014 1:03 am
by Thunder93
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
Re: Live reporting of window moving?
Posted: Fri Oct 24, 2014 1:53 am
by ozzie
Many thanks. That's perfect. I'll have to learn a bit more about BindEvent()!