Jump to content
Sign in to follow this  
david_carlos

Linha a mais (em branco) na Listbox

Recommended Posts

david_carlos

Boas

tenho este codigo

Dim open As New OpenFileDialog
        open.Title = "Abrir Arquivo ..."
        open.InitialDirectory = "D:\"
        open.Filter = "(*txt)|*.txt|Todos os Arquivos (*.*)|*.*"
        open.ShowDialog()
        Dim Itens = (My.Computer.FileSystem.ReadAllText(open.FileName, System.Text.Encoding.UTF8)).Replace(vbLf, String.Empty).Split((CChar(vbCr)))

        MsgBox(My.Computer.FileSystem.ReadAllText(open.FileName, System.Text.Encoding.Default))
        ListBox1.Items.AddRange(Itens)

so que ele ao carregar o  ficheiro esta a por uma linha em branco na listbox como se pode resolver~

Obrigado

Share this post


Link to post
Share on other sites
jviana

Na ultima linha tens "Itens" tenta substituir por "Itens.name"

Cumps. J.Viana

PS:

O que é que queres por na linha?

Cumps. J.Viana


Learning

  • VB.Net
  • HTML
  • C/C++

Share this post


Link to post
Share on other sites
jviana

O que é que queres por nos Listbox.add?

Cumps. J.Viana


Learning

  • VB.Net
  • HTML
  • C/C++

Share this post


Link to post
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
Sign in to follow this  

×
×
  • 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.