API SetParent [英] API SetParent

查看:84
本文介绍了API SetParent的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个VB6 exe(parent.exe,child.exe)

我在parent.exe中使用setparent api方法,然后child.exe中的窗体成为parent.exe中窗体的子窗体.

child.exe中的错误代码,例如msgbox变为无模式,我使用spy ++工具,发现msgbox的所有者窗口为none.

我不知道该怎么解决?
谁能帮我?~~

I have two VB6 exe(parent.exe,child.exe)

I use setparent api method in parent.exe, then form in child.exe become the child of form in parent.exe.

Bug code in child.exe, like msgbox become modeless, I use spy++ tool and find the owner window of msgbox is none.

I don''t know how to resolve it?
Who can help me?~~

推荐答案

很长一段时间,因为我看过VB,但是您不能使用以下方式将对话框设置为模式对话框:

Long time since I looked at VB but can''t you set the dialog as modal with something like:

dlg.ShowModal(true);



(对不起:无法记住确切的语法,但应该接近).

其中true表示该对话框属于调用表单(是该调用表单的子级)?

您不需要使用Win API来使对话框成为调用表单的子级.



(sorry: can''t remember the exact syntax but should be close).

where true denotes that the dialog belongs to (is the child of) the calling form?

You shouldn''t need to use the Win API to make a dialog the child of the calling form.


这篇关于API SetParent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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