|
|||
|
hello,
you may have read my other thread "display in System Tray". However i am still at the same point. Is it possible to have SWFKit install to system tray? So that when i restart my machine the icon appears straight away in the tray? i know that by clicking on the system tray checkbox in SWFKit i can get it to display an icon in the tray when the exe is running, am i dreaming the impossible dream here? is there somekind of onInstall function that will put the app in the tray? |
|
|||
|
You must save a shortcut into "startup" to make it run automatically when the computer is restarted. This can be done by the following two steps:
1. use Shell.getSpecialFolder method to get the "startup" folder in "All programs" 2. use the Shortcut object to add a shortcut into the "startup" folder. |
|
|||
|
Code:
Application.Behaviour.bShowInSystemTray = false;
Application.SysTray.useDefaultHandler = false;
Application.SysTray.icon = getAdditionalFile("msgbox03.ico");
Application.SysTray.tip = "A sample";
Application.SysTray.add();
Application.SysTray.onLClicked = Application.SysTray.onRClicked = function ()
{
var menu = new Menu;
menu.createPopupMenu();
menu.appendItem("id0", "Show");
menu.appendItem("id1", "Exit");
getMainWnd().bringToTop();
switch (menu.show())
{
case "id0":
getMainWnd().windowState = "normal";
break;
case "id1":
getMainWnd().close();
break;
}
}
Application.SysTray.onLDblClicked = function ()
{
Shell.run(getAdditionalFile("mypackage.exe"));
}
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|