Foros del Web » Programación para mayores de 30 ;) » Programación General » Visual Basic clásico »

tengo un problema con un option button a una lista

Estas en el tema de tengo un problema con un option button a una lista en el foro de Visual Basic clásico en Foros del Web. ola buenas tengo una duda que tengo que hacer un programa pero me falta una pura parte que no la puedo hacer que es de ...
  #1 (permalink)  
Antiguo 05/05/2009, 23:33
Avatar de alexander19  
Fecha de Ingreso: mayo-2009
Mensajes: 5
Antigüedad: 14 años, 11 meses
Puntos: 0
tengo un problema con un option button a una lista

ola buenas tengo una duda que tengo que hacer un programa pero me falta una pura parte que no la puedo hacer
que es de la parte de pasar de un option button a una lista
el programa se llama compra interactiva ojala me puedan ayudar estos son los codigos

Option Explicit


Private Sub Check1_Click()
If Check1.Value = 1 Then
Image2.Picture = _
LoadPicture("C:\imagenes\libros\computador.jpeg")
Image2.Visible = True
Else
Image2.Visible = False
End If
End Sub

Private Sub Check2_Click()
If Check2.Value = 1 Then
Image3.Picture = _
LoadPicture("C:\imagenes\libros\medicina.jpeg")
Image3.Visible = True
Else
Image3.Visible = False
End If
End Sub

Private Sub Check3_Click()
If Check3.Value = 1 Then
Image4.Picture = _
LoadPicture("C:\imagenes\libros\pc.jpeg")
Image4.Visible = True
Else
Image4.Visible = False
End If
End Sub

Private Sub Combo1_Click()
Select Case Combo1.Text

Case "efectivo"
Image6.Picture = LoadPicture("C:\imagenes\tipo_pago\billete.jpeg")
Case "tarjeta"
Image6.Picture = LoadPicture("C:\imagenes\tipo_pago\tarjeta.jpeg")
Case "cheque"
Image6.Picture = LoadPicture("C:\imagenes\tipo_pago\cheque.jpeg")
End Select
End Sub

Private Sub Command1_Click()
MsgBox "los esperamos luego"
Unload Me
End Sub

Private Sub Form_Load()
Combo1.AddItem "efectivo"
Combo1.AddItem "tarjeta"
Combo1.AddItem "cheque"

List1.AddItem "amd "

End Sub


Private Sub List1_Click()
Select Case List1.ListIndex
Case 0
Image1.Picture = _
LoadPicture("C:\imagenes\procesadores\AMD.JPEG")
Case 1
Image1.Picture = _
LoadPicture("C:\imagenes\procesadores\intel.jpeg")

End Select
Image1.Visible = True

End Sub

Private Sub Option1_Click(Index As Integer)

???????
End Sub


ojala me puedan ayudar
  #2 (permalink)  
Antiguo 06/05/2009, 09:04
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: tengo un problema con un option button a una lista

Bienvenido al foro.

¿Qué es exactamente lo que deseas realizar al hacer click en el optionbutton?
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #3 (permalink)  
Antiguo 06/05/2009, 23:29
Avatar de alexander19  
Fecha de Ingreso: mayo-2009
Mensajes: 5
Antigüedad: 14 años, 11 meses
Puntos: 0
Respuesta: tengo un problema con un option button a una lista

lo k tengo k hacer es k al apretarlo muestre una lista en el comando list !

i son 3 botones i kada uno tiene k mostrar una lista diferente ojala me puedas ayudar pero = se agradece ! adios
  #4 (permalink)  
Antiguo 07/05/2009, 07:34
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: tengo un problema con un option button a una lista

Sólo tienes que usar el método Clear del ListBox para limpiarlo y el método AddItem para añadir los nuevos elementos de la lista.
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #5 (permalink)  
Antiguo 07/05/2009, 23:01
Avatar de alexander19  
Fecha de Ingreso: mayo-2009
Mensajes: 5
Antigüedad: 14 años, 11 meses
Puntos: 0
Respuesta: tengo un problema con un option button a una lista

ia termine el programa i era hacii

Option Explicit


Private Sub Check1_Click()
If Check1.Value = 1 Then
Image2.Picture = _
LoadPicture("C:\imagenes\libros\computador.jpeg")
Image2.Visible = True
Else
Image2.Visible = False
End If
End Sub

Private Sub Check2_Click()
If Check2.Value = 1 Then
Image3.Picture = _
LoadPicture("C:\imagenes\libros\medicina.jpeg")
Image3.Visible = True
Else
Image3.Visible = False
End If
End Sub

Private Sub Check3_Click()
If Check3.Value = 1 Then
Image4.Picture = _
LoadPicture("C:\imagenes\libros\pc.jpeg")
Image4.Visible = True
Else
Image4.Visible = False
End If
End Sub

Private Sub Combo1_Click()
Select Case Combo1.Text

Case "efectivo"
Image6.Picture = LoadPicture("C:\imagenes\tipo_pago\billete.jpeg")
Case "tarjeta"
Image6.Picture = LoadPicture("C:\imagenes\tipo_pago\tarjeta.jpeg")
Case "cheque"
Image6.Picture = LoadPicture("C:\imagenes\tipo_pago\cheque.jpeg")
End Select
End Sub

Private Sub Command1_Click()
MsgBox "los esperamos luego"
Unload Me
End Sub

Private Sub Form_Load()
Combo1.AddItem "efectivo"
Combo1.AddItem "tarjeta"
Combo1.AddItem "cheque"

List1.AddItem "amd "

End Sub
Private Sub List1_Click()
If Option1(0).Value = True Then
Select Case List1.ListIndex
Case 0
Image1.Picture = _
LoadPicture("C:\imagenes\procesadores\AMD1.JPEG")
Case 1
Image1.Picture = _
LoadPicture("C:\imagenes\procesadores\intel1.jpeg" )
Case 2
Image1.Picture = _
LoadPicture("C:\imagenes\procesadores\AMD.JPEG")
Case 3
Image1.Picture = _
LoadPicture("C:\imagenes\procesadores\intel.JPEG")
End Select
End If

If Option2(1).Value = True Then
Select Case List1.ListIndex
Case 0
Image1.Picture = _
LoadPicture("C:\imagenes\tarjeta_video\ati.JPEG")
Case 1
Image1.Picture = _
LoadPicture("C:\imagenes\tarjeta_video\nvidia.jpeg ")
End Select
End If
If Option3(2).Value = True Then
Select Case List1.ListIndex
Case 0
Image1.Picture = _
LoadPicture("C:\imagenes\memorias\ddr.JPEG")
Case 1
Image1.Picture = _
LoadPicture("C:\imagenes\memorias\ddr2.jpeg")
Case 2
Image1.Picture = _
LoadPicture("C:\imagenes\memorias\ddr3.jpeg")






End Select

End If
End Sub

Private Sub Option1_Click(Index As Integer)
List1.Clear
List1.AddItem "AMD "
List1.AddItem "INTEL "
List1.AddItem "AMD DUAL CORE "
List1.AddItem "INTEL DUAL CORE "
End Sub

Private Sub Option2_Click(Index As Integer)
List1.Clear
List1.AddItem "ATI "
List1.AddItem "NVIDIA "
End Sub

Private Sub Option3_Click(Index As Integer)
List1.Clear
List1.AddItem "DDR "
List1.AddItem "DDR2 "
List1.AddItem "DDR3"
End Sub
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:16.