The WindowEx.SetWindowIcon function changes icon of the specified window
boolean WindowEx.SetWindowIcon(
number hWnd, --handle to window
string IcoFile --icon file with FULL path
);
Parameters
hWnd
Identifies the window to change icon.
IcoFile
Specifies the icon file, this can be standart Windows icon file and can be 16x16 - 32x32 - 48x48
filepath must be FULL ex:. "AutoPlay\\Icons\\MyIcon.ico" or "C:\\MyIcon.ico"
Return Values
If the function succeeds, the return value is TRUE
If an error occured, the return value is FALSE
This function returns FALSE (error) only if specified window not exist , TRUE otherwise
Be careful with icon type and file path these must be correct.
Note For Beginers: this function changes icon at runtime only , not patch to exe
There is no undo action of this function YOU CAN NOT ROLL BACK OLD ICON AFTER CHANGED NEW ONE but you can add old icon with this function externally.