Ace school

with brainly

  • Get help from millions of students
  • Learn from experts with step-by-step explanations
  • Level-up by helping others

A community for students.

VB.NET : how do i get a combobox to load its info frm file names in a specified directory?

Computer Science
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer

SEE EXPERT ANSWER

To see the expert answer you'll need to create a free account at Brainly

The "Dir" function returns the contents of a specific directory. You call the function once with the directory name and relevant options, and it gives you the first one. Calling the function again with no parameters several times gives you the rest one by one and returns "" when there are no more. Make sure you have the slash at the end of the first call if you're only specifying the directory. You can also use wildcard characters (* and ?) to filter the results. So you need a loop. Set up a 'while' loop to read in all the files until you get a "" and as you get them, add them to the combobox. filename = Dir("C:\Directory\") ' set up the iteration Do While filename <> "" ' when filename is empty we're done Combo1.AddItem filename ' add the file to the combo box filename = Dir() ' get the next one - will return empty when finished Loop
thanks...i tried it and posted it on DaniWeb.... http://www.daniweb.com/software-development/vbnet/threads/376595

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

Not the answer you are looking for?

Search for more explanations.

Ask your own question