Hey Everyone
In my current project, which is invloving making enhancements to an old
VB6 application, I need to do following things:
1. Call a .Net WinForm (present in a .net dll) from a VB6 MDI
application
2. The called WinForm should behave like a child form of the main MDI
form in the VB6 application
3. Called WinForm should unload if the MDI application unloads (or
ends)
1 and 3 are fairly striaghforward and I am able to do that, but I am
not able to figure out a way to #2.
I would greatly appreciated if someone can advice me on a way make the
WinForm child of the VB6 MDI Form, or point me to some resources
covering this specific topic in vb <-> .net interop.
Thanks in advance
Best regards,
Spark
Splat021@gmail.com - 21 Oct 2005 22:44 GMT
Hi everyone,
After some more research on the net, I could display the .net form as
child of the VB6 MDI form using some winapi functions like SetParent().
After calling SetParent() the .Net form appears within the MDI form,
but the forms Tab Keys and Arrow Keys do not work. That is, I am able
to type values in to the textbox but cant move to the next textbox
using the Tab key
Does anybody know about a work around for this?
Any help will be great appreciated ... thanks in advance.
Best regards,
Spark
Splat021@gmail.com - 22 Oct 2005 05:41 GMT
Hi Again,
I had post the same query on the vb.winapi forum and looks like
SetParent() is not a way to go.
Besides that it looks like converting a normal VB6 Form to MDI child at
runtime in VB6 itself needs a lot of workarounds.
Guys, feel free to advice further, and refer to this thread for more
details ...
http://groups.google.com/group/microsoft.public.vb.winapi/browse_frm/thread/712a
4197f0ae9529/768eb8296d4763c8#768eb8296d4763c8
Best Regards
Spark