<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > UI (User Interface) > CONTROLS > Control Types > StatusBar Control > StatusBar Control Commands > StatusBar_SetIcon |
Description
Sets the icon for a part in a status bar.
Syntax
n = StatusBar_SetIcon(hWnd, ctrlID, lPart, FileName, IconNumber)
Returns
Number
Parameters
Name |
Type |
Optional |
Meaning |
hWnd |
Number |
No |
Handle of the dialog containing the control |
ctrlID |
Number |
No |
Control identifier assigned to the control during CONTROL ADD ... |
lPart |
Number |
No |
Left position in pixel of part 1 |
FileName |
Number |
No |
File name to extract icon from |
IconNumber |
Number |
No |
Icon number inside FileName. Starts from 0 |
Remarks
If FileName is empty, current icon (if any) in lPart will be deleted.
If FileName is an icon file (with .ico extension), set IconNumber to 0.
Restrictions
See also
Examples
STATUSBAR_SetIcon hDlg, %ID_SBar, 1, "C:\WINDOWS\system32\shell32.dll", 1
STATUSBAR_SetIcon hDlg, %ID_SBar, 2, "C:\WINDOWS\system32\shell32.dll", 54
STATUSBAR_SetIcon hDlg, %ID_SBar, 3, APP_SOURCEPATH & "MyIcon.ico", 0
'---Icon is deleted
STATUSBAR_SetIcon hDlg, %ID_SBar, 1, "", 0
STATUSBAR_SetIcon hDlg, %ID_SBar, 2, "", 0
STATUSBAR_SetIcon hDlg, %ID_SBar, 3, "", 0