Created
March 28, 2012 11:43
-
-
Save fushnisoft/2225570 to your computer and use it in GitHub Desktop.
Determine which monitor form is on (Clarion.Net)
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
(I assume that you have your own Rectagle fom the .Net window, I have created one here as a test) | |
thisScreen OF Screen = Screen.FromControl(SELF) ! <-- screen this form is currently on | |
! Get a Rectangle to use in our test below. | |
rect OF Rectangle = NEW Rectangle(thisScreen.Bounds.X, thisScreen.Bounds.Y, thisScreen.Bounds.Width, thisScreen.Bounds.Height) | |
! Loop through all known screens and test to see if our rectangle is on one of them | |
s OF Screen &= NULL ! Not sure if there is an "inline" way to do this in clarion... | |
FOREACH s IN Screen.AllScreens | |
IF s.Bounds.IntersectsWith(rect) | |
Stop('current window is on s.DeviceName=' & s.DeviceName) | |
END | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment