We have an application where we launch a VB modal dialog from a c# form on a button click. Even though the VB dialog is a modal window we are able to go back to C# dialog on click and then the application hangs.

Looks like the VB6 form does not have a parent and hence the issue. So we decided to pass the form handle from c# to VB and make our c# dialog as a parent to the VB dialog. Any help or a sample code would be really appreciated.

Once we click search on our c# dialog, we call this:

gPMSearch.Search();

Private Sub Class_Initialize()
'Load the search form
Set Form = New frmMain
Load Form
End Sub

The form is loaded as below:

Me.Show vbModal