WindowsMove
Publié : dim. 06/nov./2005 21:10
Tout est dans le titre
Code : Tout sélectionner
;/ Author : Franco / Example by Droopy
Procedure WindowsMove(WindowID,State)
RemoveMenu_(GetSystemMenu_(WindowID,State),1,#MF_DISABLED|#MF_BYPOSITION)
DrawMenuBar_(WindowID)
EndProcedure
;/ Test
#CheckBox=0
Handle=OpenWindow(0,0,0,200,50,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Move me ?")
CreateGadgetList(WindowID(0))
CheckBoxGadget(#CheckBox,10, 10,250,20,"Checked = Moving Enabled")
SetGadgetState(#CheckBox,#True)
Repeat
Event=WaitWindowEvent()
If Event= #PB_Event_Gadget And EventGadgetID()=0
WindowsMove(Handle,GetGadgetState(0))
EndIf
Until Event=#PB_Event_CloseWindow