Table of Contents
User-Defined Types and File System Controls
The greatest common factor (gcf) is the largest number that divides evenly into two given numbers. The gcf of 12 and 16 is 4. You can find the gcf of very large numbers quickly with the Euclidean algorithm.
The code module is a collection of type definitions, variable declarations, and procedure definitions (both sub and fuction procedures) that are available to every form in a project.
Value parameters are values sent to subprograms without reference to the actual address of the value can be changed within the subprogram without affecting the value of the variable in the calling program.
When parameters are sent by reference to a subprogram, the subprogram is give the address of the value being sent. Because the subprogram knows the real location of the variable in memory, it can make changes to the value of the variable.
Parameters sent by value to a Visual Basic subprogram must be of the built-in Visual Basic types. A user-defined type may not be sent as a value parameter.
There are two ways to call a procedure:
When command buttons are given the same name, they form a control array. The first button is assigned an index value of 0 and the second a value of 1. Subsequent buttons added to the array receive successive index values.
The Hide and Show methods deactivate and activate forms in your project.
A listbox uses ListIndex property indicating a selected entry in a listbox.
The Asc() function and the Chr$() functions are inverse functions. The first converts a character to its ASCII code. The second converts an ASCII code to its corresponding character.
The drive box allows the usert to choose from a listing of active drives. The drive name is available at run-time in the Drive property.
The Change event is often used to transfer drive information from the Drive property of the drive box to the Path property of the directiory box.
The The directory box lists the directories of the drive specified in its run-time only Path property. The value of the Path property is changed by double-clicking an entry in the window. This path information is often written using a Change event procedure to the Path property of a file box.
The file box displays the files listed in the directory written into the Path property of the box