Sets the icon used in a GUI window.
GUISetIcon ( iconfile [, iconID [, winhandle]] )
| iconfile | used to display the icon in the title area. |
| iconID | [optional] The ID of the icon in the iconfile. (Default is -1). |
| winhandle | [optional] Windows handle as returned by GUICreate (default is the previously used window). |
| Success: | Returns 1. |
| Failure: | Returns 0. |
#include <GUIConstantsEx.au3>
Example()
Func Example()
Local $sFile = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") & "\icons\filetype1.ico"
Local $msg
GUICreate("My GUI new icon") ; will create a dialog box that when displayed is centered
GUISetIcon($sFile) ; will change icon
GUISetState(); will display an empty dialog box
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
EndFunc ;==>Example