Sub Procedures, Random Numbers
Procedure - A unit of code that performs a specific task and can be called from other locations of the program.
PURPOSES OF PROCEDURES:
TYPES OF PROCEDURES:
Sub Procedure - A procedure that performs a task but DOES NOT return values back to the calling module.
Function Procedure - A procedure that performs a task and RETURNS a value back to the calling module. With function procedures, the value is returned back to the calling module using the function name.
CREATING A NEW SUB PROCEDURE:
Example of a Sub Procedure:
Example of a Sub Procedure Call:
Example of a Function Procedure:
Example of a Function Procedure Call:
The WITH keyword allows you to cut down on coding when dealing with properties of controls.
Syntax of WITH statement:
With < control >
.< property1> = < value1 >
.< property2> = < value2 >
.< property3> = < value3 >
Assigning controls without the WITH KEYWORD:
Assigning controls using the WITH KEYWORD:
COMMON DIALOG CONTROL
Allows your project to use the dialog boxes that are provided as part of the Windows environment to set properties for a control such as font, font size and color.
FEATURES OF THE DIALOG CONTROL:
RETRIEVING THE COMMON DIALOG CONTROL:
Example Syntax for Setting Fonts:
With dlgCommon (assuming that you named it that)
.Flags = cdlCFScreenFonts
No Comments for this page.