mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-08-20 20:41:56 +12:00
29 lines
818 B
C#
29 lines
818 B
C#
using System.Windows.Forms;
|
|
|
|
namespace SystemTrayMenu.Helper
|
|
{
|
|
public class ScreenMouse
|
|
{
|
|
public static Screen GetScreen()
|
|
{
|
|
return Screen.PrimaryScreen;
|
|
// Maybe we need for later feature
|
|
// Show on mouse position
|
|
//return GetScreenFromMousePosition(
|
|
// Cursor.Position.X, Cursor.Position.Y);
|
|
}
|
|
|
|
//public static Screen GetScreenFromMousePosition(int x, int y)
|
|
//{
|
|
// Screen clickedScreen = null;
|
|
// foreach (Screen screen in Screen.AllScreens)
|
|
// {
|
|
// if (screen.Bounds.Contains(new Point(x, y)))
|
|
// {
|
|
// clickedScreen = screen;
|
|
// }
|
|
// }
|
|
// return clickedScreen;
|
|
//}
|
|
}
|
|
}
|