SoloCodigo
		Programación General => Visual Basic 6.0 e inferiores => Mensaje iniciado por: RadicalEd en Jueves 19 de Agosto de 2004, 19:22
		
			
			- 
				HOLA CHICOS DE SOLOCODIGO, QUISIERA SABER COMO PUEDO CREAR UN CONTROL EJEMPLO UN COMMAND EN TIEMPO DE EJECUCION, SI SABEN AYUDENMEN
GRACIAS CHAO.
			 
			
			- 
				Public WithEvents Command2 As CommandButton 'SE CREA LOS EVENTOS DEL BOTON 
Private Sub Command2_Click() 'NUEVO BOTON
    MsgBox "Button Pressed"
End Sub
Private Sub Command1_Click()
    'SE CARGA EN LA VARIABLE EN NUEVO BOTON
    Set Command2 = Me.Controls.Add("VB.CommandButton", "Command2", Me)
    'SE AGREGAN LAS PROPIEDADES
    With Command2
        .Visible = True
        .Width = 900
        .Height = 900
        .Left = Me.Width / 2 - .Width / 2
        .Top = Me.Height / 2 - .Height / 2
        .Caption = "Test Button"
    End With
End Sub
			 
			
			- 
				ENCONTRE UNO MAS SENCILLO YA QUE EL TUYO NO ME FUNCIONO PERO SOLO ME SIRVE PARA CREAR UNO,
commandbutton index=0
Load cmdBoton(1)
cmdBotonl(1).Visible = True
cmdBotonl(1).Left = cmdBotonl(0).Left + 1000