Skip to content

Instantly share code, notes, and snippets.

@vbcupu
Created February 11, 2019 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vbcupu/37a03ea7a054ea2b9c1a2fb51e22d105 to your computer and use it in GitHub Desktop.
Save vbcupu/37a03ea7a054ea2b9c1a2fb51e22d105 to your computer and use it in GitHub Desktop.
load form inside picturebox
Option Explicit
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Command1_Click()
Call tutupsemua
Form2.Show
SetParent Form2.hWnd, Picture1.hWnd ' You could also substitute a Frame for the picturebox
Form2.Move 0, 0
End Sub
Private Sub tutupsemua()
Unload Form2
Unload Form3
End Sub
Private Sub Command2_Click()
Call tutupsemua
Form3.Show
SetParent Form3.hWnd, Picture1.hWnd ' You could also substitute a Frame for the picturebox
Form3.Move 0, 0
End Sub
@vbcupu
Copy link
Author

vbcupu commented Feb 11, 2019

open form inside picture box

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment