Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine which screen the taskbar is on

Tags:

.net

vb.net

Screen.PrimaryScreen doesn't always work because on a multi-monitor setup the user may move his/her taskbar to a screen other than the primary. Finding the screen with minimum working area doesn't work too because there may be monitors with different resolutions.

Any way to locate the screen with the taskbar?

like image 421
Egemenk Avatar asked Sep 17 '11 23:09

Egemenk


1 Answers

You can do it using some Windows API calls: http://winsharp93.wordpress.com/2009/06/29/find-out-size-and-position-of-the-taskbar/ After that you can use the WorkingArea to determine on which screen the taskbar is.

like image 133
CodeIT Avatar answered Oct 11 '22 12:10

CodeIT