FileForm File Form System Form1% cmdOk txtFileName *.txt cmdCancel Cancel filFiles *.txt dirDirs cboFiletype drvDrives Label1 List Files of &Type: lblFileName File &Name: lblDirectories &Directories: lblCurrentDir lblDrives Dri&ves: cboFiletype_Click cboFiletype ListIndex NewPatternN txtFileName TextU filFiles Pattern cmdcancel_Click FileForm Empty cmdOK_ClickB EXEName SelStartJ SelLength dirDirs_Change dirDirs lblCurrentDir Caption drvDrives_Changed drvDrives Drive filFiles_Click FileName filFiles_DblClick filFiles_PathChange filFiles_PatternChange Form_Activate frmMDIm ActiveForm5 @ Form_Load Form_Unload Cancel txtFileName_Change cmdOK Enabled cboFiletype_Click Text Files (*.txt)t *.txt All Files (*.*) reinitialize the file controlse cmdcancel_Click Set the file name text box to null. By checking the text property of this text box, other procedures can tell if Cancel has beeno selected. Hide the form cmdOK_Click *[;>]* *[ ,+|/]* Bad filename Display error and select the offending text. dirDirs_Change propogate directory changes to other controls drvDrives_Change change the dirDirs control path, it willt pass the change on to the filFiles control filFiles_Click echo the selected name in the Text boxt filFiles_DblClick we have a final selection from the File Save dialog txtFilename.Text = filFiles.FileName filFiles_PathChange filFiles_PatternChange Show the current search pattern in the txtFileName control Form_Activate If File Open dialog, set Text box to current patternn If a File Save dialog, set the text box to the current file namee Save As File is not named Untitled File has a name initialize file controls Clear current selection in Filetype list box Set FileType list box to first item (*.txt) highlight the current selection Form_Load display full path name in a label add items to List Files of Type list( Text Files (*.txt) All Files (*.*) Form_Unload Don't unload form, just hide it txtFileName_Change Disable OK button if no filename.