FromHwnd() public static method

Returns the virtual desktop that the specified window is located.
public static FromHwnd ( IntPtr hwnd ) : VirtualDesktop
hwnd System.IntPtr
return VirtualDesktop
コード例 #1
0
 public static VirtualDesktop GetCurrentDesktop(this Form form)
 {
     return(VirtualDesktop.FromHwnd(form.Handle));
 }
コード例 #2
0
 /// <summary>
 /// Returns a virtual desktop that window is located.
 /// </summary>
 public static VirtualDesktop GetCurrentDesktop(this Window window)
 {
     return(VirtualDesktop.FromHwnd(window.GetHandle()));
 }