GETPICT( ) Function
Displays the Open Picture dialog box and returns the name of the picture file you chose.
GETPICT([cFileExtensions] [, cFileNameCaption] [, cOpenButtonCaption])
Return Values
Character
Parameters
cFileExtensions
Specifies the file extensions of the picture files displayed in the scrollable list when the All Files menu item isn't chosen.cFileExtensions can take the following forms:
- If cFileExtensions contains a single extension (for example, .bmp), only files with that extension are displayed.
- cFileExtensions can also contain wildcards (* and ?). All files with extensions that meet the wildcard criteria are displayed. For example, if cFileExtensions is ?X?, all files with the extension .fxp, .exe, and .txt are displayed.
- If cFileExtensions contains an empty string (""), all available graphics files (for example, files with the extensions .bmp and .dib ) are displayed.
cFileNameCaption
Specifies the caption displayed above the File Name text box. cFileNameCaption replaces "File Name" that appears when cFileNameCaption is omitted.cOpenButtonCaption
Specifies a caption for the OK button.
Remarks
The GETPICT( ) function returns the empty string if you exit the Open Picture dialog box by pressing ESC, choosing the Cancel button, or clicking the Close button. The Open dialog displayed by issuing GETPICT( ) in the Command window makes it possible for you to quickly locate all the graphic files supported in Visual FoxPro. Check the Preview check box to display the currently selected graphics file.
Visual FoxPro supports the following graphic file formats.
Graphic format | File extension |
---|---|
Bitmap | .bmp |
Device Independent Bitmap | .dib |
Graphics Interchange Format | .gif |
Joint Photographic Electronic Group | .jpg |
Cursor | .cur |
Animated Cursor | .ani |
Icon | .ico |
Note In Visual FoxPro, cursor, animated cursor, and icon files can be used as graphics files. For example, you can specify an animated cursor file for the Picture property for the Image control (however, the Image control displays the static representation of the cursor).
Use the CLEAR RESOURCES command to clear all cached graphic files, including .gif and .jpg files.