Dela via


Using the File System: Writing to and Reading from Files

Many programs interact with external data, such as a database, XML, or even a text file. In a previous lesson, you learned how to create a database and use the data in your program. You can also use data that is stored in files and folders on your computer. Visual Basic makes it easy to read from and write to files by using the My.Computer.FileSystem Object.

In this set of lessons, you will create a Picture Viewer application with which you can view pictures in your MyPictures folder. You will learn how to use the My object to read file names from the folder and to read from and write to a text file.

In This Section