# Function Reference

GUISetIcon

Sets the icon used in a GUI window.

GUISetIcon ( iconfile [, iconID [, winhandle]] )

Parameters

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).

Return Value

Success: | Returns 1.
Failure: | Returns 0.

Remarks

None.

Related

GUICreate

Example

#include <GUIConstants.au3>
GUICreate ("My GUI new icon") ; will create a dialog box that when displayed is centered
GUISetIcon ("autosave.ico") ; 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