extracting_20a_20file_27s_20thumbnail
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| extracting_20a_20file_27s_20thumbnail [2018/03/31 13:19] – external edit 127.0.0.1 | extracting_20a_20file_27s_20thumbnail [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| =====Extracting a file's thumbnail===== | =====Extracting a file's thumbnail===== | ||
| - | //by Richard Russell, July 2007//\\ \\ Several file types can have associated thumbnail images, which are displayed (for example) in Windows Explorer' | + | //by Richard Russell, July 2007//\\ \\ Several file types can have associated thumbnail images, which are displayed (for example) in Windows Explorer' |
| + | |||
| + | <code bb4w> | ||
| INSTALL @lib$+" | INSTALL @lib$+" | ||
| Line 17: | Line 19: | ||
| hbm% = FN_thumbnail(file$, | hbm% = FN_thumbnail(file$, | ||
| SYS " | SYS " | ||
| - | Here **xpos%** and **ypos%** are the position where you want the static control to be displayed (pixels from the top left-hand corner) and **cx%** and **cy%** are the desired width and height in pixels. If you want to display the thumbnail for a folder **don' | + | </ |
| + | |||
| + | Here **xpos%** and **ypos%** are the position where you want the static control to be displayed (pixels from the top left-hand corner) and **cx%** and **cy%** are the desired width and height in pixels. If you want to display the thumbnail for a folder **don' | ||
| + | |||
| + | <code bb4w> | ||
| SYS " | SYS " | ||
| - | Don't do this whilst the image is still displayed, since it will not refresh correctly when uncovered, or when restored after being minimised.\\ \\ The **FN_thumbnail** function is listed below. Its parameters are the file or folder whose thumbnail is wanted and the preferred width and height of the thumbnail in pixels. It returns a handle to the thumbnail image, or zero if the file does not have a thumbnail. An error will result if the file/folder does not exist or the file is an unsuitable type.\\ \\ | + | </ |
| + | |||
| + | Don't do this whilst the image is still displayed, since it will not refresh correctly when uncovered, or when restored after being minimised.\\ \\ The **FN_thumbnail** function is listed below. Its parameters are the file or folder whose thumbnail is wanted and the preferred width and height of the thumbnail in pixels. It returns a handle to the thumbnail image, or zero if the file does not have a thumbnail. An error will result if the file/folder does not exist or the file is an unsuitable type. | ||
| + | |||
| + | <code bb4w> | ||
| DEF FN_thumbnail(file$, | DEF FN_thumbnail(file$, | ||
| LOCAL patha%, pathw%, name%, ole32%, shfroot%, shf%, pidl%, iei%, flags%, hbm% | LOCAL patha%, pathw%, name%, ole32%, shfroot%, shf%, pidl%, iei%, flags%, hbm% | ||
| Line 84: | Line 94: | ||
| SYS `CoUninitialize` | SYS `CoUninitialize` | ||
| = hbm% | = hbm% | ||
| + | </ | ||
extracting_20a_20file_27s_20thumbnail.1522502359.txt.gz · Last modified: 2024/01/05 00:17 (external edit)