Chapter 24. Working with Files

function OpenWin(url, w, h) { if(!w) w = 400; if(!h) h = 300; window.open(url, "_new", "width=" + w + ",height=" + h + ",menubar=no,toobar=no,scrollbars=yes", true); } function Print() { window.focus(); if(window.print) { window.print(); window.setTimeout('window.close();',5000); } }
Team-Fly    

Special Edition Using Microsoft® Visual Basic® .NET
By Brian Siler, Jeff Spotts
Table of Contents
Part VI:  Advanced Programming Topics


In this chapter

Manipulating the File System Using VB

Working with File Streams

Parsing XML Files

Accessing the Registry

Traditional Visual Basic File Functions

Questions: Using Files

No matter what development language and platform you use, at some point you will probably need to write code that interacts with underlying operating system files. For example, you might need to copy files or launch another program. You can do all this interactively by using Windows Explorer or a Command Prompt window. As you will see in this chapter, you can accomplish these same file operations easily by using Visual Basic code.

Another use for files is the storage and retrieval of information. In other chapters, you learned how to use databases to store information. However, sometimes the power of a database engine may not be necessary or even appropriate. For example, you may want to create a simple activity log or process a comma-delimited text file. In this chapter, you will examine a couple of options that allow you to store and access information in plain text files with minimal or no structure. We also will look at file streams, which can be used to work with many different types of data. In addition, we will discuss accessing the Windows Registry, where application settings and other information can be stored.


    Team-Fly    
    Top
     



    Special Edition Using Visual Basic. NET
    Special Edition Using Visual Basic.NET
    ISBN: 078972572X
    EAN: 2147483647
    Year: 2001
    Pages: 198

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net