Visual Basic - Desplazar Botones

Life is soft - evento anual de software empresarial
 
Vista:
Imágen de perfil de Juan Carlos C
Val: 10
Ha aumentado su posición en 2 puestos en Visual Basic (en relación al último mes)
Gráfica de Visual Basic

Desplazar Botones

Publicado por Juan Carlos C (130 intervenciones) el 03/10/2011 21:40:07
estoy trabajando en un formulario para pantalla touch screen y deseo tener una fila de botones que se puedan desplazar a izquierda u derecha por medio de un scroll bar o con el dedo, es decir como un objeto que contenga los botones, si alguien sabe de un objeto que haga esto o como se puede hacer con los que hay actualmente le estaré altamente agradecido. de antemano gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 119
Ha disminuido 1 puesto en Visual Basic (en relación al último mes)
Gráfica de Visual Basic

Desplazar Botones

Publicado por Christian (713 intervenciones) el 03/10/2011 22:25:15
Si con los controles que hay se puede hacer, facilmente ....

dos picturebox uno contiene al otro y dentro de este pones los botones, y con el hscroll desplazas

saludos.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Desplazar Botones

Publicado por XHkrElite (518 intervenciones) el 04/10/2011 06:11:22
Hola Juan Carlos
inserta un Hscroll1, un command1,un command2
ponle a hscroll1 el Max a 10
inserta en declaraciones el codigo de abajo y corre el programa
arrastrale o dale click

Private Sub Form_Load()
Command1.Left = 100
Command1.Width = 255
Command2.Left = 1000
Command2.Width = 255
HScroll1.Left = 100
HScroll1.Width = 1095
End Sub

Private Sub HScroll1_Change()
If HScroll1.Value = 1 Then
Command1.Left = 100
Command2.Left = 900
ElseIf HScroll1.Value = 2 Then
Command1.Left = 200
Command2.Left = 800
ElseIf HScroll1.Value = 3 Then
Command1.Left = 300
Command2.Left = 700
ElseIf HScroll1.Value = 4 Then
Command1.Left = 400
Command2.Left = 600
ElseIf HScroll1.Value = 5 Then
Command1.Left = 500
Command2.Left = 500
ElseIf HScroll1.Value = 6 Then
Command1.Left = 600
Command2.Left = 400
ElseIf HScroll1.Value = 7 Then
Command1.Left = 700
Command2.Left = 300
ElseIf HScroll1.Value = 8 Then
Command1.Left = 800
Command2.Left = 200
ElseIf HScroll1.Value = 9 Then
Command1.Left = 900
Command2.Left = 100
ElseIf HScroll1.Value = 10 Then
Command1.Left = 1000
Command2.Left = 1
End If
End Sub

Private Sub HScroll1_Scroll()
If HScroll1.Value = 1 Then
Command1.Left = 100
Command2.Left = 900
ElseIf HScroll1.Value = 2 Then
Command1.Left = 200
Command2.Left = 800
ElseIf HScroll1.Value = 3 Then
Command1.Left = 300
Command2.Left = 700
ElseIf HScroll1.Value = 4 Then
Command1.Left = 400
Command2.Left = 600
ElseIf HScroll1.Value = 5 Then
Command1.Left = 500
Command2.Left = 500
ElseIf HScroll1.Value = 6 Then
Command1.Left = 600
Command2.Left = 400
ElseIf HScroll1.Value = 7 Then
Command1.Left = 700
Command2.Left = 300
ElseIf HScroll1.Value = 8 Then
Command1.Left = 800
Command2.Left = 200
ElseIf HScroll1.Value = 9 Then
Command1.Left = 900
Command2.Left = 100
ElseIf HScroll1.Value = 10 Then
Command1.Left = 1000
Command2.Left = 1
End If
End Sub


lo mismo se puede hacer con un vscroll1
Bye
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de Juan Carlos C
Val: 10
Ha aumentado su posición en 2 puestos en Visual Basic (en relación al último mes)
Gráfica de Visual Basic

Desplazar Botones

Publicado por Juan Carlos C (130 intervenciones) el 04/10/2011 13:12:17
Gracias Christian y XHkrElite me han dado muy buenas ideas...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar