C# 클래스 BrightnessTray.WindowPositioning

Helper class for positioning the main window.
파일 보기 프로젝트 열기: navhaxs/BrightnessTray 1 사용 예제들

공개 메소드들

메소드 설명
GetCursorPosition ( ) : Point

Returns the cursor's current position as a System.Windows.Point.

GetNotifyAreaButtonRectangle ( ) : Rect?

Retrieves the rectangle of the 'Show Hidden Icons' button, or null if it can't be found.

GetNotifyIconRectLegacy ( System.Windows.Forms.NotifyIcon notifyicon ) : Rect?

Returns a rectangle representing the location of the specified NotifyIcon. (Windows Vista and earlier.)

GetNotifyIconRectWindows7 ( System.Windows.Forms.NotifyIcon notifyicon ) : Rect?

Returns a rectangle representing the location of the specified NotifyIcon. (Windows 7+.)

GetNotifyIconRectangle ( System.Windows.Forms.NotifyIcon notifyicon ) : Rect?

Returns a Rect containing the location of the specified notify icon.

GetTaskBarInfo ( ) : TaskBarInfo

Retrieves taskbar position and alignment.

GetWindowClientAreaSize ( IntPtr hWnd ) : Rect

Returns a Rect containing the bounds of the specified window's client area (i.e. area excluding border).

GetWindowPosition ( System.Windows.Forms.NotifyIcon notifyicon, double windowwidth, double windowheight, double dpi ) : Point

Returns the optimum window position in relation to the specified notify icon.

GetWindowSize ( IntPtr hWnd ) : Rect

Returns a Rect containing the bounds of the specified window's area (i.e. area excluding border).

GetWorkingArea ( Rect rectangle ) : Rect

Returns the working area of the monitor that intersects most with the specified rectangle. If no monitor can be found, the closest monitor to the rectangle is returned.

IsCursorOverNotifyIcon ( System.Windows.Forms.NotifyIcon notifyicon ) : bool

Returns true if the cursor is currently over the specified notify icon.

IsNotifyIconInFlyOut ( System.Windows.Forms.NotifyIcon notifyicon, TaskBarInfo taskbarinfo ) : bool

Determines whether the specified System.Windows.Forms.NotifyIcon is contained within the Windows 7 notification area fly-out. Note that this function will return false if the fly-out is closed.

IsNotifyIconInFlyOut ( Rect notifyiconrect, Rect taskbarrect ) : bool

Determines whether the specified System.Windows.Forms.NotifyIcon is contained within the Windows 7 notification area fly-out. Note that this function will return false if the fly-out is closed.

IsPointInNotifyIcon ( Point point, System.Windows.Forms.NotifyIcon notifyicon ) : bool

Checks whether a point is within the bounds of the specified notify icon.

메소드 상세

GetCursorPosition() 공개 정적인 메소드

Returns the cursor's current position as a System.Windows.Point.
public static GetCursorPosition ( ) : Point
리턴 Point

GetNotifyAreaButtonRectangle() 공개 정적인 메소드

Retrieves the rectangle of the 'Show Hidden Icons' button, or null if it can't be found.
public static GetNotifyAreaButtonRectangle ( ) : Rect?
리턴 Rect?

GetNotifyIconRectLegacy() 공개 정적인 메소드

Returns a rectangle representing the location of the specified NotifyIcon. (Windows Vista and earlier.)
public static GetNotifyIconRectLegacy ( System.Windows.Forms.NotifyIcon notifyicon ) : Rect?
notifyicon System.Windows.Forms.NotifyIcon The NotifyIcon whose location should be returned.
리턴 Rect?

GetNotifyIconRectWindows7() 공개 정적인 메소드

Returns a rectangle representing the location of the specified NotifyIcon. (Windows 7+.)
public static GetNotifyIconRectWindows7 ( System.Windows.Forms.NotifyIcon notifyicon ) : Rect?
notifyicon System.Windows.Forms.NotifyIcon The NotifyIcon whose location should be returned.
리턴 Rect?

GetNotifyIconRectangle() 공개 정적인 메소드

Returns a Rect containing the location of the specified notify icon.
public static GetNotifyIconRectangle ( System.Windows.Forms.NotifyIcon notifyicon ) : Rect?
notifyicon System.Windows.Forms.NotifyIcon The NotifyIcon whose location should be retrieved.
리턴 Rect?

GetTaskBarInfo() 공개 정적인 메소드

Retrieves taskbar position and alignment.
public static GetTaskBarInfo ( ) : TaskBarInfo
리턴 TaskBarInfo

GetWindowClientAreaSize() 공개 정적인 메소드

Returns a Rect containing the bounds of the specified window's client area (i.e. area excluding border).
public static GetWindowClientAreaSize ( IntPtr hWnd ) : Rect
hWnd System.IntPtr Handle of the window.
리턴 System.Windows.Rect

GetWindowPosition() 공개 정적인 메소드

Returns the optimum window position in relation to the specified notify icon.
public static GetWindowPosition ( System.Windows.Forms.NotifyIcon notifyicon, double windowwidth, double windowheight, double dpi ) : Point
notifyicon System.Windows.Forms.NotifyIcon The notify icon that the window should be aligned to.
windowwidth double The width of the window.
windowheight double The height of the window.
dpi double The system's DPI (in relative units: 1.0 = 96 DPI, 1.25 = 120 DPI, etc.).
리턴 Point

GetWindowSize() 공개 정적인 메소드

Returns a Rect containing the bounds of the specified window's area (i.e. area excluding border).
public static GetWindowSize ( IntPtr hWnd ) : Rect
hWnd System.IntPtr Handle of the window.
리턴 System.Windows.Rect

GetWorkingArea() 공개 정적인 메소드

Returns the working area of the monitor that intersects most with the specified rectangle. If no monitor can be found, the closest monitor to the rectangle is returned.
public static GetWorkingArea ( Rect rectangle ) : Rect
rectangle System.Windows.Rect The rectangle that is located on the monitor whose working area should be returned.
리턴 System.Windows.Rect

IsCursorOverNotifyIcon() 공개 정적인 메소드

Returns true if the cursor is currently over the specified notify icon.
public static IsCursorOverNotifyIcon ( System.Windows.Forms.NotifyIcon notifyicon ) : bool
notifyicon System.Windows.Forms.NotifyIcon The notify icon to test.
리턴 bool

IsNotifyIconInFlyOut() 공개 정적인 메소드

Determines whether the specified System.Windows.Forms.NotifyIcon is contained within the Windows 7 notification area fly-out. Note that this function will return false if the fly-out is closed.
public static IsNotifyIconInFlyOut ( System.Windows.Forms.NotifyIcon notifyicon, TaskBarInfo taskbarinfo ) : bool
notifyicon System.Windows.Forms.NotifyIcon Notify icon to test.
taskbarinfo TaskBarInfo Taskbar information structure containing taskbar alignment (bottom/top/left/right).
리턴 bool

IsNotifyIconInFlyOut() 공개 정적인 메소드

Determines whether the specified System.Windows.Forms.NotifyIcon is contained within the Windows 7 notification area fly-out. Note that this function will return false if the fly-out is closed.
public static IsNotifyIconInFlyOut ( Rect notifyiconrect, Rect taskbarrect ) : bool
notifyiconrect System.Windows.Rect Rectangle of notify icon bounds.
taskbarrect System.Windows.Rect Rectangle of taskbar bounds.
리턴 bool

IsPointInNotifyIcon() 공개 정적인 메소드

Checks whether a point is within the bounds of the specified notify icon.
public static IsPointInNotifyIcon ( Point point, System.Windows.Forms.NotifyIcon notifyicon ) : bool
point Point Point to check.
notifyicon System.Windows.Forms.NotifyIcon Notify icon to check.
리턴 bool