How do I determine which monitor my .NET Windows Forms program is running on?

You can get an array of Screens that you have using this code.

Screen[] screens = Screen.AllScreens;

You can also figure out which screen you are on, by running this code (this is the windows form you are on)

Screen screen = Screen.FromControl(this); //this is the Form class

in short check out the Screen class and static helper methods, they might help you.

MSDN Link, doesn’t have much..I suggest messing around in the code by yourself.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)