Page 131 - DCAP408_WEB_PROGRAMMING
P. 131
Kumar Vishal, Lovely Professional University Unit 8: File I/O
Unit 8: File I/O Notes
CONTENTS
Objectives
Introduction
8.1 How Window Programs access Disk Files?
8.1.1 Opening
8.1.2 Reading, Writing, Closing: Disk Files
8.1.3 Read Disk File into Buffer
8.2 Creating File Selection Dialog Box
8.3 Creating a Text Editor
8.4 Summary
8.5 Keywords
8.6 Review Questions
8.7 Further Readings
Objectives
After studying this unit, you will be able to:
Scan how windows programs access disk files
Describe file selection dialog box
Demonstrate text editor
Introduction
Now that you’ve added several programming statements to your Visual Basic language
repertoire, you can learn about additional controls to add new features to your applications and
to take advantage of some of the more powerful commands you now know. As you learn about
new controls, your programming ability grows by leaps and bounds because your programs
become richer in functionality and user interaction.
Almost every application in Microsoft Windows displays files, directories, and drives to the
user in some fashion. In Visual Basic, files are displayed in a file list box, directories in a
directory list box, and available drives in a drive list box. These controls will increase the
magnitude of your application.
8.1 How Window Programs access Disk Files?
8.1.1 Opening
Sometimes installing new software in Windows can overwrite the file associations for other
software. Graphics programs are notorious for this bad behavior. Fortunately, when it happens,
LOVELY PROFESSIONAL UNIVERSITY 125