The File Control Object Model

Team-Fly    

 
eMbedded Visual Basic: Windows CE and Pocket PC Mobile Applications
By Chris Tacke, Timothy Bassett
Table of Contents
appendix A.  Control Reference


The following tables outline the Object Model for the File Control. This control is included in MSCEFile.dll.

Table A.24. File Control Methods
Method Return Description
Close Nothing Closes an open file.
Get Nothing Reads binary data into a Variant variable. Usually used for data written with the Put method.
Input String Reads a specified number of characters from an open text file.
InputB Byte array Reads a specified number of bytes from an open binary file.
InputFields Variant array Reads a specified number of fields from an open sequential, comma-delimited file.
LineInputString String Reads the next single line (delimited by vbCr or vbCrLf) from an open sequential text file.
LinePrint Nothing Appends a line of text to an open sequential text file. Lineprint also terminates the line with vbCrLf.
Open Nothing Opens a file in Input, Output, Append, Random or Binary mode.
Put Nothing Writes a variant variable to disk as binary data.
WriteFields Nothing Writes numeric or text data to an open sequential file.
Table A.25. File Control Properties
Property Return Description
Attr FileModeEnum Gets the mode in which a file was opened. Can be confusing, as it does not return the FileAttrEnum for the open file.
EOF Boolean Returns True when the end of a file is reached.
Loc Long Gets the current read/write position of an open file.
LOF Long Gets the length of a file in bytes.
Name String Gets the logical name of the File control as set in the Properties window.
Parent Object Gets a reference to the File control's parent object, such as its containing form.
Seek Long Sets and returns the current read/write position in an open file. Seek always returns Loc + 1, except for when a file is first opened.
Tag String Sets or gets a string that can be used to hold any additional information the programmer wants to store.

Team-Fly    
Top
 


eMbedded Visual BasicR. WindowsR CE and Pocket PC Mobile Applications
eMbedded Visual BasicR. WindowsR CE and Pocket PC Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2001
Pages: 108

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