如何在vb.net中将Windows应用程序实现到我的应用程序中? [英] How do I implement windows apps into my app in vb.net?

查看:90
本文介绍了如何在vb.net中将Windows应用程序实现到我的应用程序中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

这个是一个艰难而复杂的一个,所以阅读全部!



我希望能够得到一个外部的Windows应用程序,自定义它的标题栏(使它看起来像我想要的程度),然后把它放在我的应用程序中,而不是让我的表格成为MDI Parent或面板。



请帮忙,

我不知道该怎么做,到目前为止还没有尝试过。

Hi guys,
This one is a tough and complex one so read ALL of it!

I want to be able to get an external windows application, customize it's title bar (make it look like what I want to a certain extent), then put it INSIDE my application without making my form an MDI Parent or with a panel.

Please help,
I don't know how to do this and haven't tried anything so far.

推荐答案

使用Process类启动应用程序。等待它空闲然后从Process类获取它的MainWindowHandle。使用它和主机窗口的窗口句柄,例如Panel或你想要的任何控件,然后调用 SetParent [ ^ ]设置您启动到窗口的应用程序的父窗口。



请注意,应用程序将简要显示在您的应用程序之外。没有办法解决这个问题。



你无法控制应用程序。



修改窗口标题栏可能适用于某些应用程序但不是全部,您将无法修改有关该栏的所有内容。你启动的应用程序可以完全控制自己的标题栏,你最终无权拥有它。



哦!我差点忘了。并非每个应用程序都允许您更改其父窗口,并且可能会发生一些奇怪的渲染。
Launch the app with the Process class. Wait for it to be idle then get its MainWindowHandle from the Process class. Use this and the window handle of your host window, such as a Panel or whatever control you want, and call SetParent[^] to set the parent window of the app you launched to your window.

Be warned, the application WILL show up outside of your application briefly. There is no way around that.

You do NOT have control over the application.

Modifying the window title bar may be possible for some apps but not all and you won't be able to modify everything about the bar. The application you launch has complete control of its own title bar and you will not have ultimately authority over it.

Oh! I almost forgot. Not every application is going to let you change its parent window and some weird rendering may take place.


这篇关于如何在vb.net中将Windows应用程序实现到我的应用程序中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆