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.
Pattern Property Example
                        Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
' This example updates a text box with the new pattern selected in a file
' list box. The controls are set up so that when the user enters a pattern in
' the text box (such as *.TXT), it is reflected in the file list box, much
' like the interaction you see in a File Open dialog box. If a full path is
' entered in the text box (such as C:BIN*.EXE), the text is automatically
' parsed into path and pattern components by the file list box.
 
' 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:
'    • Command button
'    • Directory list box
'    • File list box
'    • Text box
' 3. Set the command button's Default property to 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 ()          ' Text is parsed into path/pattern components
    File1.Filename = Text1.Text ' Pass the path to the directory list
    Dir1.Path = File1.Path
 END SUB
 
 SUB Dir1_Change ()
    File1.Path = Dir1.Path      ' Pass a path change to files list
 END SUB
 
 SUB File1_PatternChange ()
    Text1.Text = File1.Pattern  ' Set text to new pattern
 END SUB