How to Launch an exe as a MDI Child form in VB.Net?

  • Thread starter Thread starter Sanjay Tiwari
  • Start date Start date
S

Sanjay Tiwari

Hello,

I have MDI application developed in VB.Net. I am also
having one applicaition Exe developed in VB 6.0. I want
to launch application exe as an MDI Child Form in my Main
MDI application. Can anybody tell me how it can be done in
VB.net?

I know we can do it in VB MDI Application as mentioned
bellow:

Private Declare Function SetParent Lib "user32" (ByVal
hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Declare Function FindWindow Lib "user32"
Alias "FindWindowA" (ByVal lpClassName As String, ByVal
lpWindowName As String) As Long

Dim MyHandle As Long
Private Sub Form_Load()
Shell ("c:\winnt\notepad.exe")
MyHandle = FindWindow(vbNullString, "Untitled - Notepad")
SetParent MyHandle, Me.hWnd
End Sub


Thanks
Sanjay
 
Back
Top