Skip to content

Instantly share code, notes, and snippets.

@fushnisoft
Last active December 13, 2015 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fushnisoft/4f9da267e165033e007a to your computer and use it in GitHub Desktop.
Save fushnisoft/4f9da267e165033e007a to your computer and use it in GitHub Desktop.
Move a clarion window from clicking on a region
! 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