Hold on a sec, I knew I had the syntax for it but I didn't have it on my this computer. I booted up my old P166 computer and found this for you. This method for adding controls is only possible in VB6.
Make a Form with 1 CommandButton on it. Place the following code into it.
I hope this helps you.Code:Private Sub Command1_Click() Controls.Add "VB.CommandButton", "cmdNewButton" Me!cmdNewButton.Move 0,0 Me!cmdNewButton.Caption = "PRESS" Me!cmdNewButton.Visible = True End Sub
[Edited by Megatron on 05-18-2000 at 06:20 PM]




Reply With Quote