关于wpf加载外部exe程序

.Net技术 码拜 8年前 (2016-06-03) 1600次浏览
关于wpf加载外部exe程序  现在项目需要这个功能并且要求能够给外部的exe发送指令。问一下有没有demo或代码啊。exe要加载到本人界面的某个容器里面
解决方案

100

你找找FindWindow和SetParent这两个windowsAPI的用法,就有个基本思路了。

100

SetParent(appWin, this.Handle);//this在这里是Panel控件
4 // Remove border and whatnot
5 SetWindowLong(appWin, GWL_STYLE, WS_VISIBLE);
7 // Move the window to overlay it on this window
8 MoveWindow(appWin, 0, 0, this.Width, this.Height, true);

http://www.cnblogs.com/bitzhuwei/archive/2012/05/24/SmileWei_EmbeddedApp.html


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明关于wpf加载外部exe程序
喜欢 (0)
[1034331897@qq.com]
分享 (0)