Hi, I see the need to load the content of a picturebox (or a framebox) inside a new form and show this form in a modal way, the only way I know of is through SetParent api, everything is fine, but I have the problem that it stops To work the change of focus through the Tab key, do you have any suggestions for this problem, or how I could move a picturebox into a blank form and without this inconvenience.
you can test this behavior, add to a form1 a picturebox with two textbox , and add a Form2, run the code
Code:Option Explicit Private Declare Function SetParent Lib "user32.dll" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Private Sub Form_Load() Me.Show SetParent Picture1.hWnd, Form2.hWnd Form2.Show vbModal End Sub




Reply With Quote