Aloha all!
阿罗哈!
I am trying to use the win32 API to set the parent of an application to a panel in my C# application.
我正在尝试使用win32 API将应用程序的父类设置为c#应用程序中的面板。
I can get most applications to work... However I have one application which was written in VB6 which I am having problems with...
我可以让大多数应用程序工作……然而,我有一个应用是用VB6编写的,我对……
When I inspect it using spy++ the application loads in 2 main forms 'ThunderRT6Main' and 'ThunderRT6MDIForm' both with the same title.
当我使用spy++查看它时,应用程序加载了两种主要的表单‘ThunderRT6Main’和‘ThunderRT6MDIForm’,标题都是相同的。
I have found the handle of both of these and tried to call SetParent on them both but the window does nothing and does not move anywhere...
我找到了它们的句柄,并尝试对它们调用SetParent,但窗口什么都不做,也不移动……
Is there something funky I need to do when invoking SetParent() on a VB6 app?
在VB6应用程序上调用SetParent()时,我需要做什么时髦的事情吗?
1 个解决方案
#1
1
ThunderRT6Main
is the hidden owner of every top level form in VB6. It sets the application icon, the one you see in the Applications tab of Task Manager. You can read this interesting article
ThunderRT6Main是VB6中每个*表单的隐藏所有者。它设置应用程序图标,在任务管理器的应用程序选项卡中可以看到。你可以阅读这篇有趣的文章。
A window can have a parent or an owner but not both
窗口可以有父窗口或所有者,但不能同时有父窗口或所有者
Basicly you might need WS_CHILD
set before calling SetParent
.
在调用SetParent之前,您可能需要设置WS_CHILD。
#1
1
ThunderRT6Main
is the hidden owner of every top level form in VB6. It sets the application icon, the one you see in the Applications tab of Task Manager. You can read this interesting article
ThunderRT6Main是VB6中每个*表单的隐藏所有者。它设置应用程序图标,在任务管理器的应用程序选项卡中可以看到。你可以阅读这篇有趣的文章。
A window can have a parent or an owner but not both
窗口可以有父窗口或所有者,但不能同时有父窗口或所有者
Basicly you might need WS_CHILD
set before calling SetParent
.
在调用SetParent之前,您可能需要设置WS_CHILD。