In the newest DesktopX release you can register an object
and its script to act as a controller for certain functions. Only the controller
receives some messages like system tray messages (i.e. the right-click message
on the widget right click menu).
To register an object as a controller use Desktopx.RegisterController ObjectName
Example:
Sub Object_OnScriptEnter
desktopx.RegisterController Object.Name
End Sub
The object will then be called from the OnControl
notification:
Function OnControl(lType, lCode)
End function
The host will call OnControl with messages information in
lType and lCode. These messages are available:
lType
lCode
Description
1
1
1
The systray menu is requested.
2
The widget menu is requested
from object right-click.
2
0x0201
Left button down
0x0202
Left button up
0x0203
Left buttondouble-click
0x0204
Right button down
0x0205
Right button up
0x0206
Right button double-click
Returning true to received messages will cause DesktopX not
processing them. For instance you can replace the right click or systray widget
menu by returning true to 1 / 1 notification and provide your own menu as
described in the preceding chapter.