ex.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
PatternChange Event Example
                        Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
' The example updates a file list box with files matching the pattern typed
' into the text box. If a full path is entered into the text box, such
' as C:\VBDOS\*.exe, the text is automatically parsed into path and
' pattern components. The path is displayed by the label control.
 
' To try this example:
' 1. Choose New Project from the File menu
' 2. Choose New Form from the File menu to create a form with:
'    • Text box
'    • Label
'    • File list box
'    • Command button
' 3. Set command button properties:
'    • Caption = OK
'    • Default = True
' 4. Press Alt+F4 to return to the programming environment
' 5. Copy the code example below to the form module
' 6. Press F5 to run the example
 
 SUB Command1_Click ()            ' OK button clicked
     ' Text is parsed into path and pattern components.
     File1.FileName = Text1.Text
 END SUB
 
 SUB File1_PathChange ()
     Label1.Caption = "Path: " + File1.Path
 END SUB
 
 SUB File1_PatternChange ()
     Text1.Text = File1.Pattern         ' Set text to new pattern
 END SUB