Jump to content

[VB6] - Carregar numa combobox nome de ficheiros [resolvido]


David Pintassilgo
 Share

Recommended Posts

Boas

Já não programou em vb6 desde 2002 o commado Dir devolve uma lista de ficheiros de determinada extensão e a combobox tem o método .AddItem.

Jorge

"The Dark Side Clouds Everthing. Impossible To See The Future Is."My rig: Intel Core 2 Quad Q9450 | abit IP35P | 4G Kingston 800 Mhz | XFX GeForce 9800 GX2 1G ddr3 | 2X WD5000AAJS 500Gb Sata 2 | PSU 600W || Caixa El-Diablo | Creative XMod

Link to comment
Share on other sites

David Pintassilgo

Obrigado!

Tive mesmo de engendrar aqui uma cena marada assim desse tipo, coloquei o objecto list1 invisivel na form a fazer aparecer só os files da extenção prentendida e 'varri' todo o conteudo e carreguei

Private Sub Form_Load()
Dim x As Integer
For x = 0 To File1.ListCount - 1 ''Correr desde a posição 0 até á posição Total-1
    Combo1.AddItem File1.List(x) ''Adicioar á combobox 
Next
End Sub

cool stuffs to check.

http://blog.zxcoders.com//

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.