It would be quicker to re-write the pop up form in VB6, and add the .net 
database layer logic as dll with a com wrapper, if there is one, or just 
implement some ado in vb6 for the database stuff. 
 
Or we-write the vb6 stuff in .net :)
 

> From: bill.mccarthy.li...@live.com.au
> To: ozdotnet@ozdotnet.com
> Subject: RE: VB6 calling modal .net dialog
> Date: Wed, 14 Dec 2011 13:49:33 +1100
> 
> In VB6 the main window handle is actually a hidden window, so you'd need to
> get the form's handle
> 
> |-----Original Message-----
> |From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-
> |boun...@ozdotnet.com] On Behalf Of Greg Keogh
> |Sent: Wednesday, 14 December 2011 11:39 AM
> |To: 'ozDotNet'
> |Subject: RE: VB6 calling modal .net dialog
> |
> |Matt, I tried something similar with an nunit test, like this:
> |
> |
> |
> |IntPtr hwnd =
> |System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle;
> |
> |var win = new NativeWindow();
> |
> |win.AssignHandle(hwnd);
> |
> |var picker = new MyPicker();
> |
> |var result = picker.ShowDialog(win);
> |
> |
> |
> |I was hoping that this would set the nunit app window to be the owner of
> the
> |ShowDialog, but sadly two things go wrong: (1) It's not modal, but that
> might be
> |a quirk with using the nunit window (2) The dialog doesn't appear in the
> |CenterParent position, it goes to screen top-left.
> |
> |
> |
> |Greg
> |
> |
> 
> 
                                          

Reply via email to