C# 클래스 Zhwang.SuperNotifyIcon.Finder.WindowPositioning

Helper class for positioning the main window.
파일 보기 프로젝트 열기: rzhw/SuperNotifyIcon

공개 메소드들

메소드 설명
GetCursorPosition ( ) : Point

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

GetWindowClientAreaSize ( IntPtr hWnd ) : Rectangle

Returns a Rectangle 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, bool pinned ) : Point

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

GetWindowSize ( IntPtr hWnd ) : Rectangle

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

GetWorkingArea ( Rectangle rectangle ) : Rectangle

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.

메소드 상세

GetCursorPosition() 공개 정적인 메소드

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

GetWindowClientAreaSize() 공개 정적인 메소드

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

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, bool pinned ) : 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.).
pinned bool Whether the window is pinned open or not. Affects positioning in Windows 7 only.
리턴 Point

GetWindowSize() 공개 정적인 메소드

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

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 ( Rectangle rectangle ) : Rectangle
rectangle System.Drawing.Rectangle The rectangle that is located on the monitor whose working area should be returned.
리턴 System.Drawing.Rectangle

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