-
-
Save fushnisoft/4f9da267e165033e007a to your computer and use it in GitHub Desktop.
Move a clarion window from clicking on a region
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! NOTE: Look here for a more correct implementation - http://support.microsoft.com/kb/114593 | |
! The below code works well enough but it does have some limitations, such as the nested ACCEPT loop will stop the calling window from receiving events. | |
MoveWindow PROCEDURE() | |
origX LONG | |
origY LONG | |
CODE | |
CASE Field() | |
OF ?MyRegion | |
CASE EVENT() | |
OF Event:MouseDown | |
origX = MOUSEX() | |
origY = MOUSEY() | |
ACCEPT | |
CASE EVENT() | |
OF Event:MouseUp | |
BREAK | |
OF Event:MouseMove | |
0{Prop:Xpos} = 0{Prop:Xpos} + (MOUSEX() - origX) | |
0{Prop:Ypos} = 0{Prop:Ypos} + (MOUSEY() - origY) | |
END | |
END | |
END | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment