Visual Basic Foro
Programación => Visual Basic 6 => Mensaje iniciado por: XxDarkxX en Enero 21, 2012, 01:49:37 am
-
Hola desde hace días eh tratado de ordenar los controles labels por fila y columna ejemp:
Cuando el control sea mayor al formulario el control se recorra y se ordene pero no eh logrado muchos avances y solo tengo esto
Private Sub Form_Resize()
Dim Fila As Long
Dim Columna As Long
Dim Index As Integer
For Index = 0 To Lbl.Count - 1
If Lbl(Index).Left + Lbl(Index).Width >= Me.Width Then
Fila = Fila + 1
Lbl(Index).Left = Columna * (Lbl(Index).Width + 240)
Lbl(Index).Top = Fila * (Lbl(Index).Height + 240)
Columna = Columna + 10
Else
End If
Next
End Sub
me gustaria que me pudieran ayudar
-
Hola es algo como esto lo que buscas?
Option Explicit
Private Sub Form_Load()
Dim I As Long
Lbl(0).Move 0, 0
For I = 1 To 100
Load Lbl(I)
Lbl(I).Visible = True
Next
End Sub
Private Sub Form_Resize()
Dim I As Integer
For I = 1 To Lbl.Count - 1
If Lbl(I - 1).Left + Lbl(I - 1).Width + Lbl(I).Width > Me.ScaleWidth Then
Lbl(I).Move 0, Lbl(I - 1).Top + Lbl(I - 1).Height
Else
Lbl(I).Move Lbl(I - 1).Left + Lbl(I - 1).Width, Lbl(I - 1).Top '+ Lbl(I).Height
End If
Next
End Sub
-
Leandro si has escuchado esta expresion "Me quito el sombrero ante ti" sino "Mis repetos"
Gracias llevava buen rato con la cabeza dandome vueltas