VB5: How do I move a textbox and a command button into a picturebox.
Also, can I duplicate the picturebox, including these controls?
THANK YOU !!!!
Printable View
VB5: How do I move a textbox and a command button into a picturebox.
Also, can I duplicate the picturebox, including these controls?
THANK YOU !!!!
Not sure about VB5 but in VB6 you can set the objects .Container property....Quote:
Originally Posted by DennisTheVB
Code:Private Sub Command1_Click()
Set Text1.Container = Picture1 ' Put Text1 into Picture1
Text1.Move 10,10 ' move to position 10,10
Set Command1.Container = Picture1
Command1.Move Text1.Width + 100, 10
End Sub
Thank you, thank you and thank you again !!! :wave:
Very nice code :D
Do you know how to do it with another form becuase I tried but I got an error?
I don't think VB has a built in function to do that, you probably need to use the SetParent API.Quote:
Originally Posted by MongooseRoadkill
I think this example does that, Reparent controls from one form to another.
I've got it working now thanks :)