Language Reference Guide : 4. System Classes : FrameExec Class : SetWindowIcon Method
 
Share this page                  
SetWindowIcon Method
The SetWindowIcon method sets or changes the icon for a currently running frame.
This method has the following syntax:
FrameExec.SetWindowIcon(windowicon = BitmapObject)
This method has the following parameter:
windowicon
Specifies an image in a valid format for your window system
You can use the SetWindowIcon method only to set an icon for a currently running frame. You cannot use this method to set an icon for an application or to set the WindowIcon attribute of a FrameSource object.
If a frame is already reduced to an icon, this method changes the displayed icon immediately.
In most instances, this attribute is set in the initialize statement for the frame. However, the attribute can also be set in an event block, usually when the frame receives a user event.
For example, assume users have a window devoted to messages and that most users maintain this window as an icon until they want to read their messages. You can define two images for that icon: one indicating that there are no messages and one indicating that messages are waiting.
Whenever the frame receives a user event with a message, you set the icon to the appropriate image. Similarly, when all messages are read, you can reset the icon.