COM interop

G

Guest

I have a .net class that displays a .net form (1), when the user clicks a
button on the form (1) an event is fired that is captured by a wrapping COM
dll. The COM DLL instantiates another COM Class that shows a form (2). The
wrapping COM object is written in VB classic and the called COM object that
shows the form (2) should show it as application Modal ie myform.Show
vbModal. The thing is it does not, THE FORM IS shwon for all VB forms as
modal, but for c# forms (1) they are left free.

I thought I may be able to set the parent form when showing, I can get the
form (1) hwnd, but I need a VB form object to pass to COM form (2) .show
method. Any ideas?

Or is there any other way around this?
 
R

Ralph

Ade said:
I have a .net class that displays a .net form (1), when the user clicks a
button on the form (1) an event is fired that is captured by a wrapping COM
dll. The COM DLL instantiates another COM Class that shows a form (2). The
wrapping COM object is written in VB classic and the called COM object that
shows the form (2) should show it as application Modal ie myform.Show
vbModal. The thing is it does not, THE FORM IS shwon for all VB forms as
modal, but for c# forms (1) they are left free.

I thought I may be able to set the parent form when showing, I can get the
form (1) hwnd, but I need a VB form object to pass to COM form (2) .show
method. Any ideas?

Or is there any other way around this?

You need to post this in a dotNet newsgroup. This newsgroup is for classic
VB (VB6 and lower).

Try...
news://msnews.microsoft.com/
microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb
microsoft.public.dotnet.framework.interop
microsoft.public.vsnet.general
microsoft.public.vstudio.general
microsoft.public.vstudio.setup
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top