'En déclarations Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long 'La fonction Public function IntegrerForm(IFSource as picturebox, IFDestination as picturebox) SetParent ifsource.hwnd, ifdestination.hwnd end function
rem à mettre dans Form1 Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Private Sub CmdActiver_Click() SetParent Form2.hWnd, Me.hWnd Form2.Show End Sub
rem à mettre dans Form2 Private Sub Form_Load() Form2.Top = 0 Form2.Left = 0 Form2.Width = Form1.ScaleWidth Form2.Height = Form1.ScaleHeight End Sub Private Sub CmdQuitter_Click() Unload Me End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question