zoukankan      html  css  js  c++  java
  • 调用第三方程序,指定父窗体

    [DllImport("user32.dll")]
            
    static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);

            [DllImport(
    "user32.dll")]
            
    private static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);

            
    private void button1_Click(object sender, EventArgs e)
            {
                System.Diagnostics.Process p 
    = System.Diagnostics.Process.Start("calc");
                p.WaitForInputIdle();
                SetParent(p.MainWindowHandle, 
    this.splitContainer1.Panel2.Handle);
                ShowWindowAsync(p.MainWindowHandle, 
    3);
            }
  • 相关阅读:
    第七周作业
    第六周作业
    CSS
    12 week work
    7 week work
    6 week work 3
    6 week work 2
    6 week work 1
    常用的网络服务小总结
    网络基础设置
  • 原文地址:https://www.cnblogs.com/kenter/p/2123272.html
Copyright © 2011-2022 走看看