我想用自己做的窗口调用另一个应用程序(比如qq,360这些)。。能让窗口能想一个包住这些程序。。(有点个盔甲一样)

解决方案 »

  1.   

    From http://wenda.tianya.cn/wenda/thread?tid=15ee9d8070e47819sonichui123 [小学生] 2009-4-5 1:50:22 119.130.196.* 
    你这个要求很吊哦,应该非常难实现,通常都是在同一进程里,把form1设为mdi窗口,在其下添加子窗口罢了。可能的实现方法是通过System.Diagnostics.Process.Start("进程名")运行exe程序,再查找窗口的句柄使用API中的SetParent函数把exe中的窗口都设为你的form的子窗口,不过窗口会不会失去响应就很难说啦。
      

  2.   

    一个api函数.setparent还是哪个。忘了。
      

  3.   

    要用到Windows编程,用API就能搞定哈
      

  4.   

            private void UpdateFile()
            {
                string UpdateFilesDir, ExeFileName, ServerAddress, ClientAddress;
                UpdateFilesDir = ConfigurationManager.AppSettings["UpdateFilesDir"];
                ServerAddress = ConfigurationManager.AppSettings["ServerAddress"] + "\\" + UpdateFilesDir;
                ClientAddress = System.Environment.CurrentDirectory + "\\" + UpdateFilesDir;
                ExeFileName = ConfigurationManager.AppSettings["ExeFileName"];            UpdateEx ue = new UpdateEx(ServerAddress, ClientAddress);
                string[] need=ue.ComparerFiles();
                int count = need.Length;
                if (count == 0)
                {
                    label2.Text = "当前文件是最新的, 不需要更新!";
                    panel1.Visible = true;
                    this.Refresh();
                }
                else
                {
                    Console.WriteLine("需要复制的文件:" + count.ToString());
                    progressBar1.Maximum = count;
                    for (int i = 0; i < count; i++)
                    {
                        label2.Text = "正在复制数据,请稍等......";
                        ue.CopyFiles(need[i]);
                        progressBar1.Value++;
                        listBox1.Items.Add(need[i]);
                        this.Refresh();
                    }
                    label2.Text = "更新完毕!";
                    this.Refresh();
                }
                Thread.Sleep(2000);//等待2秒钟
                ProcessStartInfo p = new ProcessStartInfo(ClientAddress + "\\" + ExeFileName);
                Process.Start(p);
                this.Close();
            }
      

  5.   

    成功一半了..问题可以嵌套第三方软件了..可是为什么只可以嵌入cmd.exe
    却不可以嵌入QQ呢.