File DialogFilters

Use the Filters property of the FileDialog object to return a reference to the FileDialogFilters collection for the FileDialog. The filters control the types of files that are displayed. By default, there are 24 preset filters that the user can select from the drop-down menu at the bottom of the File O Open dialog box. The Clear method of the FileDialogFilters collection removes the preset filters, and you add your own filter that shows only . jpg files.

The Show method of the FileDialog object displays the dialog box. When the user clicks the Open button, the Show method returns a value of True. If the user clicks the Cancel button, the Show method returns False and you exit from the procedure.

0 0

Post a comment