如题。

解决方案 »

  1.   

    [DllImport("user32.dll", EntryPoint = "FindWindowEx", SetLastError = true)]
    static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
    [DllImport("user32.dll", EntryPoint = "ShowWindow", SetLastError = true)]
    static extern bool ShowWindow(IntPtr hWnd, uint nCmdShow);
    IntPtr h= FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null);
    if (h!= IntPtr.Zero)
    {
        ShowWindow(h, 0);
    }
      

  2.   

    Form f=Form.FromHandle(handle)
    试试
      

  3.   

    wuyq11 的方法我试过,我是用IPC通道把进程1的Form的handle传给进程2,然后在进程1中通过共享对象在进程2中启动Form2.
      

  4.   

    补充下, 进程2是控制台程序,FORM2 是从进程2里创建。