ImageGear Professional v18.2 > API Reference Guide > GUI Component API Reference > GUI Component Objects > IGGUIDlgCtl Control > IGGUIDlgCtl Methods > ShowLoadFileDlg Method |
Shows the Windows standard file-chooser dialog. There are no arguments to this subroutine, but the programmer may set the IGGUIDlgCtl Controln.Directory property before calling ShowOpenDirDlg, to set the "starting point" from which the end-user will navigate.
The file-chooser dialog is slightly modified as displayed by ShowLoadFileDlg, and is as follows:
The dialog behaves essentially the same as the standard Windows file-chooser dialog: the user navigates to different directories using the "Look in:" pulldown, the navigation buttons, and by double-clicking in the list area. Whenever a file is selected, its name is displayed in the "File name:" field.
The "Files of type" pull-down list displays all of the image file-types supported by ImageGear, plus an "All Files" entry. When the user selects a particular file-type, then the list area will only show directories and files whose file-name extensions correspond to the selected file-type.
The "File Info:" field is generated by ImageGear, by reading the first few bytes of the file and determining its actual file-type (thus, for instance, a JPEG image might be misnamed "foobar.bmp" - the "File Info" field will nevertheless show that the file is a 1-page JPEG file).
Clicking the "Open" button will close the dialog, set the IGGUIDlgCtl Controln.FileName property to the chosen file, set the IGGUIDlgCtl Controln.PageNum property to the chosen page number and return True to the application program. Note that the file is not loaded by the ShowLoadFileDlg processing: it is up to the application programmer to actually call IGFormatsCtl Controln.LoadPageFromFile or IGFormatsCtl Controln.LoadDocumentFromFile.
Clicking the "Cancel" button will close the dialog and return False to the application program.
Clicking the "Details" button will display the File Information dialog (see ShowFileInfoDlg Method above) for the currently selected file.
ShowLoadFileDlg() As Boolean
True indicates that the user chose a filename and page number and clicked "Open". False indicates that the user clicked "Cancel".
N/A
ig_guidlg.vb6.exe