Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?~~
Posted
Updated 16-Jan-11 22:05pm
v2
Comments
Dalek Dave 17-Jan-11 4:05am    
Edited for Readability.
Аslam Iqbal 17-Jan-11 4:08am    
2 separate .exe or 2 forms?

1 solution

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

dlg.ShowModal(true);


(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.
 
Share this answer
 
Comments
ericqliu88 17-Jan-11 6:23am    
thank you~
In vb, use < msgbox "hello">,will show a modal form by system.
Because child.ext is designed by others,I can't modify.
I can modify parent.exe,So I want to know how process need to add in setparent function.
R. Giskard Reventlov 17-Jan-11 6:59am    
So, to clarify, you have a form from which you wish to invoke (as a modal dialog) a form from another exe?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900