Team-Fly |
eMbedded Visual Basic: Windows CE and Pocket PC Mobile Applications By Chris Tacke, Timothy Bassett | |
Table of Contents | |
IN THIS CHAPTER
Most Visual Basic programmers today access files through the familiar Win32 File System Object (commonly called the fso). The fso provides an easy-to-use and quick-to-develop-with object model that works for most text file applications. When it comes to binary or random access, the fso falters, and VB developers then turn to what's often called free filing probably named as such due to using the FreeFile() method to get an available file number. Free filing is an older, procedural-based method of access files that's valid for any file access, but isn't quite as easy to use as the object-oriented fso. Although the eVB's FileSystem and File controls don't have the extensive object model that the fso has, they provide just about everything developers could want or need for accessing any type of file-binary or text, sequential or random. In fact, I find that using these controls has distinct advantages over file programming in Win32 because they wrap the functionality of both free filing and the fso in a nice, compact set of methods and properties. Whether accessing small text configuration files or large binary data files, the FileSystem and File controls are all you'll need. This chapter explores some of the functionality behind the two controls in the MSCEFileCtl library: FileSystem and File. The controls' uses are limited only by the applications in which they are used and by your coding imagination ; an exhaustive treatment of all the entire library's uses could be a book in itself. We'll cover some of their more common uses, give you ideas on where else you might use them, and add in the use of the TreeView control as well. In this chapter you will
As we'll do with all chapters, we will also uncover some of eVB's more subtle nuances that can cause problems and headaches , as well as give coding tips applicable to any eVB application. |
Team-Fly |
Top |