高手请进。。。winform(c#)问题 我想用自己做的窗口调用另一个应用程序(比如qq,360这些)。。能让窗口能想一个包住这些程序。。(有点个盔甲一样) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 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的子窗口,不过窗口会不会失去响应就很难说啦。 一个api函数.setparent还是哪个。忘了。 要用到Windows编程,用API就能搞定哈 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(); } 成功一半了..问题可以嵌套第三方软件了..可是为什么只可以嵌入cmd.exe却不可以嵌入QQ呢. combox自动补全数值的问题 通过用户输入获取数据 jmail 打印pdf的问题,100分 奋斗了几个晚上,写了一个支持插件及自定义模版的代码机器人 C#多线程问题。着急啊!线程错乱! 有没有数码相框的实例呢 如何能获得一个winform的graphics对象?(不重载OnPaint方法,也不使用Paint事件) 关于一个源代码归属问题 急!!!截取字符串问题 关于txt文档的简单问题 征集各种循环示例 if判断语句 练习(有答案 佳)
你这个要求很吊哦,应该非常难实现,通常都是在同一进程里,把form1设为mdi窗口,在其下添加子窗口罢了。可能的实现方法是通过System.Diagnostics.Process.Start("进程名")运行exe程序,再查找窗口的句柄使用API中的SetParent函数把exe中的窗口都设为你的form的子窗口,不过窗口会不会失去响应就很难说啦。
{
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();
}
却不可以嵌入QQ呢.