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

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
 

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