Application.AddTrayItem
From Real Software Documentation
Method
| This method is only available on Windows and Linux platforms. For cross-platform development, use #If...#Endif with the Target... specifiers to make sure you will not attempt to use this method on an incompatible platform. |
Adds the passed item to the System Tray via the TrayItem class.
AddTrayItem returns a Boolean that indicates success or failure. If it returns True, the TrayItem was added successfully. The System Tray is supported on Windows and Linux only. See the TrayItem class.
Known Issues
AddTrayItem generates a NilObjectException when run on 64-bit Windows.
Example
This project is in the Examples folder that ships with Real Studio. The Open event of the App class calls AddTrayItem and then uses a class based on a Timer to start animating the item.
me.AutoQuit = false
mAppItem = new AppItem
If me.AddTrayItem( mAppItem ) Then
mTimer = new IconSwitcher( mAppItem, 10 )
End If
mAppItem = new AppItem
If me.AddTrayItem( mAppItem ) Then
mTimer = new IconSwitcher( mAppItem, 10 )
End If
See Also
TrayItem class.
