elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Únete al Grupo Steam elhacker.NET


  Mostrar Temas
Páginas: [1]
1  Programación / Programación Visual Basic / Problema con el Sorted en: 5 Enero 2017, 13:15 pm
Buenas. Tengo una aplicación (no creada por mi) en la cual, uno de los ListBox ha de mostrarse por orden alfabético.. Sé que la opción más fácil es la de modificar la propiedad Sorted para el Listbox. El tema es que haga lo que haga, no funciona.

Os pego un par de pantallazos para que veias el tema :






Como veis, he probado a cambiarlo en cuadro de propiedades y tambien en el código pero nada. Decir que tengo (más bien tenía, pero siempre a nivel bastante básico) algo de conocimientos de Vb pero hace muchísimo que no lo toco y ahora acabo de entrar en una nueva empresa y las estoy pasando algo canutas. Asi que, por favor si pudierais echarme una mano os lo agradecería inmensamente. Por si fuera de ayuda, tambien os pego el código del formulario principal.

Código:
Private Sub BuscaTXT_Change()
Dim tomoño As String, conto As Integer
List1.Clear
tomoño = Len(BuscaTXT.Text)
'If tomoño <> "" Then
For Bucle = 0 To (PlantillasLST.ListCount - 1)
    If Left(PlantillasLST.List(Bucle), tomoño) = BuscaTXT.Text Then
        List1.List(conto) = PlantillasLST.List(Bucle)
        conto = conto + 1
    End If
Next Bucle
'Else
'For Bucle = 0 To (PlantillasLST.ListCount - 1)
'    List1.List(Bucle) = PlantillasLST.List(Bucle)
'Next Bucle
'End If
End Sub

Private Sub CodigoLST_Click()
    Call AxustarLSTs(CodigoLST.ListIndex)
    Call PasarValor(CodigoLST.ListIndex)
End Sub

Private Sub ControlTMP_Timer()
    Estado = True
    If SOFsTXT.Text = "" Then Estado = False
    If SEtiquetaTXT.Text = "" Then Estado = False
    If Estado = True Then FuncionCMD(1).Enabled = True Else FuncionCMD(1).Enabled = False
End Sub

Private Sub DescripcionLST_Click()
    Call AxustarLSTs(DescripcionLST.ListIndex)
    Call PasarValor(DescripcionLST.ListIndex)
End Sub

Private Sub FicheirosLST_Click()
    Call AxustarLSTs(FicheirosLST.ListIndex)
    Call PasarValor(FicheirosLST.ListIndex)
End Sub

Private Sub Form_Load()
    Intro = Chr(13) & Chr(10)
    Call CargarFicheiro("Config", App.Path & "\config.cfg")
    Call CargarOFs
    Call LeerOFs
    Call LeerPlantillas
    Seguro = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
    End
End Sub

Private Sub FuncionCMD_Click(Index As Integer)
    Select Case Index
        Case 0:
                Call CargarOFs
                Call LeerOFs
        Case 1:
                Call EnviarOF(SSeriesTXT.Text & SOFsTXT.Text, SSeriesTXT.Text & Intro & SOFsTXT.Text & Intro & SDescripcionTXT.Text & Intro & SLoteTXT.Text & Intro & SPesoTXT.Text & Intro & ScodigoTXT.Text & Intro & SSacoTXT.Text & Intro & SLineaTXT.Text & Intro & SEtiquetaTXT.Text & Intro & SCantidadeTXT.Text & Intro & SenvaseTXT.Text & Intro & SGranelTXT.Text & Intro)
        Case 2:
                If FicheirosLST.ListIndex <> -1 Then
                    Call BorrarFicheiro(FicheirosLST.List(FicheirosLST.ListIndex))
                End If
        Case 3: Call LeerPlantillas
        Case 4: SEtiquetaTXT.Text = "-": SSacoTXT.Text = "N"
        'Case 5:
                'Call EnviarOF(Right("0" & Second(Time), 2) & Right("000000" & Minute(Time), 6), Right("0" & Second(Time), 2) & Intro & Right("000000" & Minute(Time), 6) & Intro & "PEIXE FRESCO" & Intro & "L4632" & Intro & "40KG" & Intro & "45687" & Intro & "S" & Intro & "1" & Intro & SEtiquetaTXT.Text & Intro)
    End Select
End Sub

Private Sub LineaLST_Click()
    Call AxustarLSTs(LineaLST.ListIndex)
    Call PasarValor(LineaLST.ListIndex)
End Sub

Private Sub List1_Click()
SEtiquetaTXT.Text = List1.Text
List1.Sorted = True
End Sub

Private Sub LoteLST_Click()
    Call AxustarLSTs(LoteLST.ListIndex)
    Call PasarValor(LoteLST.ListIndex)
End Sub

Private Sub MNUConfigurar_Click()
    ConfigFRM.Visible = True
End Sub

Private Sub MNUPechar_Click()
    End
End Sub

Private Sub OFsLST_Click()
    Call AxustarLSTs(OFsLST.ListIndex)
    Call PasarValor(OFsLST.ListIndex)
End Sub

Private Sub PesoLST_Click()
    Call AxustarLSTs(PesoLST.ListIndex)
    Call PasarValor(PesoLST.ListIndex)
End Sub

Private Sub PlantillasLST_Click()
   
    SEtiquetaTXT.Text = PlantillasLST.Text
    SSacoTXT.Text = "S"
   
End Sub

Private Sub SacoLST_Click()
    Call AxustarLSTs(SacoLST.ListIndex)
    Call PasarValor(SacoLST.ListIndex)
End Sub

Private Sub SeriesLST_Click()
    Call AxustarLSTs(SeriesLST.ListIndex)
    Call PasarValor(SeriesLST.ListIndex)
End Sub

Muchas gracias y perdonad si la pregunta es muy tonta pero estoy bastante ofuscado. Graciñas de nuevo.
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines