Application.AddTrayItem

From Real Software Documentation

Jump to: navigation, search
Method

Application.AddTrayItem ( Item as TrayItem ) As Boolean

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

See Also

TrayItem class.

Personal tools