CONST WM_syscommand=&h112
CONST sc_move=&hF012
DECLARE FUNCTION ReleaseCapture LIB "user32" ALIAS "ReleaseCapture" () AS LONG
DECLARE SUB movecontrol
CREATE Form AS QFORM
CAPTION = "Form1"
Width = 320
Height = 240
Center
CREATE B AS QRICHEDIT
onmousedown=movecontrol
text="left click and move me"
END CREATE
END CREATE
Form.SHOWMODAL
SUB movecontrol
releasecapture
sendmessage(b.handle,Wm_syscommand,sc_move,0)
END SUB
|