For some reason, I could not reply to your original post, but hopefully you will see this.
Use the SetParent API. I don't have VB at the moment, so I can't show you, but I know it works. You just have to provide the parent hWnd, and the child hWnd.
Printable View
For some reason, I could not reply to your original post, but hopefully you will see this.
Use the SetParent API. I don't have VB at the moment, so I can't show you, but I know it works. You just have to provide the parent hWnd, and the child hWnd.
I had the exact same problem with that thread. Here is what I wanted to post.VB Code:
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long 'Insert the following code to your first form (named Form1): Private Sub Form_Load() Load Form2 Form2.Show Private Sub Form_Load() 'Replace the 'Form1' below with the name of the 'Parnt' Form Dim r As Long r = SetParent(Me.hWnd, Form1.hWnd) End Sub 'To position the form once it has been made a part of the parent form, use this code: 'Replace '250, 250, 400, 400' with the form coordinates. Call MoveWindow(Me.hwnd, 250, 250, 400, 400, 1)