This VB source snippet demonstrates many common programming constructs. It demonstrates the list box control, which is used in virtually every Windows application ever made. Further it demonstrates the do while loop construct. This allows you in programming languages to loop through every item in a set. Lastly, this code sample demonstrates how to interact some with the File system. Specifically we see how to loop through all the files in a given folder.
To use this code snippet create a new VB6 project. Drag a button onto the form. Double click the button. This will take you to the buttons click event handler method. Inside this method add the following code. Run the application, click the button, and check it out.
Obviously this just barely scratches the surface as to what we can do with loops, controls, and files, but it gives us a simple example to start with. If you would like to go more in depth in any of these areas check out the links below.
Note: The source for this was found at DreamVB which is no longer online.