Esempio n. 1
0
        public Form1()
        {
            InitializeComponent();
            var handler = User32_Gdi.FindWindow("#32770", "Windows 任务管理器");

            if (!handler.IsNull)
            {
                User32_Gdi.SetParent(handler, new HWND(Handle));
            }
        }
Esempio n. 2
0
 internal static HWND IWin2Ptr(System.Windows.Forms.IWin32Window wnd, bool desktopIfNull = true) => wnd?.Handle ?? User32_Gdi.FindWindow("Progman", null);
Esempio n. 3
0
 internal static IntPtr IWin2Ptr(System.Windows.Forms.IWin32Window wnd, bool desktopIfNull = true)
 {
     return(wnd == null?User32_Gdi.FindWindow("Progman", null) : (IntPtr) new HandleRef(wnd, wnd.Handle));
 }