


从打开Adobe Reader那张图片可以看出来所谓的“内嵌程序和宿主程序的窗口激活状态问题”。当内嵌程序窗口激活时,表 面上将其包裹起来的宿主窗口却处于非激活的状态。想隐藏这一点的话,把窗口的FormBorderStyle属性设为 None吧,然后自己在窗口上画关闭、最大化、最小化按钮好了。原作者的实现思路更能暴露本质,所 以这里用原作者的代码段解释一下实现过程。1、启动要嵌入的应用程序进程Process p = null;try { // Start the processp = System.Diagnostics.Process.Start(this.exeName); // Wait for process to be created and enter idle conditionp.WaitForInputIdle(); // Get the main handle appWin = p.MainWindowHandle;}catch (Exception ex){MessageBox.Show(this, ex.Message, "Error");}