Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-10-2006, 10:51 AM
Junior Member
 
Join Date: Feb 2006
Posts: 7
Default INSTALL TO SYSTEM TRAY

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?
Reply With Quote
  #2 (permalink)  
Old 02-10-2006, 11:59 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:INSTALL TO SYSTEM 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.
Reply With Quote
  #3 (permalink)  
Old 02-12-2006, 09:23 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:INSTALL TO SYSTEM TRAY

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"));
}
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:15 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.