Created
September 26, 2015 04:28
-
-
Save yuka1984/e7e863b4aeb7eac7d576 to your computer and use it in GitHub Desktop.
P/Invoke使わないで モニタハンドラを取得してみた ref: http://qiita.com/yu_ka1984/items/4a0439d421593c763fc4
This file contains hidden or 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
| var monitorfield = typeof(System.Windows.Forms.Screen).GetTypeInfo().DeclaredFields.Single(x => x.Name == "hmonitor"); | |
| var Screens = System.Windows.Forms.Screen.AllScreens.Select(x => new { | |
| Screen = x, | |
| hmonitor = (IntPtr)monitorfield.GetValue(x) }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment