Page 1 of 1
Posted: Tue Feb 11, 2003 4:05 pm
by BackupUser
Restored from previous forum. Originally posted by Skipsy.
Hi,
The following line are supposed to display something as soon as
the window is moved :
Repeat
EVT_WIND.l = WaitWindowEvent()
If EVT_WIND = #PB_Event_MoveWindow
Gosub Display
EndIf
If EVT_WIND = #PB_Event_CloseWindow ; Bouton 'fermer'
Quit = 1
EndIf
Until Quit = 1
End
Nothing happens.... 'Display' Subroutine works fine (if I move
the gosub out of the If-EndIf.
Something I misunderstood ???

Posted: Tue Feb 11, 2003 6:05 pm
by BackupUser
Restored from previous forum. Originally posted by tinman.
Originally posted by Skipsy
Something I misunderstood ???
You will probably need to include something to handle the repaint event. This tells your program to redraw whatever you have in the window.
If EVT_WIND = #PB_Event_Repaint
Gosub Display
EndIf
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + all updates, PB3.51, Ed3.53)
Posted: Tue Feb 11, 2003 7:12 pm
by BackupUser
Restored from previous forum. Originally posted by Skipsy.
Works fine now thanks but... well, I don't understand something
anyway :
I have replaced the #PB_Event_Repaint by #PB_Event_MoveWindow
again and set a "breakpoint" just before the 'Gosub' instruction.
Nothing happens when I drag the window everywhere on the screen !!!
Obviously it does not detect the move or "MoveWindow" means
something else (?)
WW
Posted: Tue Feb 11, 2003 7:49 pm
by BackupUser
Restored from previous forum. Originally posted by tinman.
Originally posted by Skipsy
Nothing happens when I drag the window everywhere on the screen !!!
Obviously it does not detect the move or "MoveWindow" means
something else (?)
I have the same here, but I have never used the MoveWindow event before so I am not sure if there is anything special you need to do, or if I done something wrong in the code.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + all updates, PB3.51, Ed3.53)
Posted: Tue Feb 11, 2003 8:42 pm
by BackupUser
Restored from previous forum. Originally posted by PB.
See here for the correct method:
viewtopic.php?t=2575
Posted: Tue Feb 11, 2003 8:46 pm
by BackupUser
Restored from previous forum. Originally posted by plouf.
Seems tha move is only catchable inside a callback
dunno why
Christos