• Viernes 17 de Mayo de 2024, 04:26

Autor Tema:  Controles  (Leído 1102 veces)

RadicalEd

  • Moderador
  • ******
  • Mensajes: 2430
  • Nacionalidad: co
    • Ver Perfil
Controles
« en: Jueves 19 de Agosto de 2004, 19:22 »
0
HOLA CHICOS DE SOLOCODIGO, QUISIERA SABER COMO PUEDO CREAR UN CONTROL EJEMPLO UN COMMAND EN TIEMPO DE EJECUCION, SI SABEN AYUDENMEN
GRACIAS CHAO.
El pasado son solo recuerdos, el futuro son solo sueños

Claudio_Escobar

  • Nuevo Miembro
  • *
  • Mensajes: 3
    • Ver Perfil
Re: Controles
« Respuesta #1 en: Viernes 20 de Agosto de 2004, 03:51 »
0
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

RadicalEd

  • Moderador
  • ******
  • Mensajes: 2430
  • Nacionalidad: co
    • Ver Perfil
Re: Controles
« Respuesta #2 en: Sábado 21 de Agosto de 2004, 01:49 »
0
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
El pasado son solo recuerdos, el futuro son solo sueños