Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-26-2008, 03:49 PM
Junior Member
 
Join Date: Feb 2008
Posts: 7
Default Minimize (default) to system tray . . . How?

Yes, I'm a SWFKit newbie.

After searching through the forum, I've found a way to make the application show up in the system tray.

However, what I really want to do is to "intercept" the default minimize action, and always minimize the application to the system tray.
  • Does anyone know where I can look this sort of thing up online?
  • Or does anyone have a code sample that already does this?

Any help would be greatly appreciated.
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 04:12 PM
Senior Member
 
Join Date: Nov 2007
Posts: 128
Default Re: Minimize (default) to system tray . . . How?

I have seen the same thing in other apps, but have never tried to replicate it. Any help on this will be appreciated by me as well.
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 08:23 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Minimize (default) to system tray . . . How?

It is just to hide the program when the "-" button is pressed, so that it seems that the window is minimized to the system tray.

Code:
getMainWnd().onSize = function (type, w, h) {
	if (type == 1/*minimized*/) {
		this.hide();
	}
}
Before hiding the window, you must be sure that you have added an icon into the system tray, or the window will be totally disappeared.
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 08:59 PM
Junior Member
 
Join Date: Feb 2008
Posts: 7
Default Re: Minimize (default) to system tray . . . How?

Awesome!

So, I put that code into the Initialize script, and it works beautifully.

My next question is, where can I look up that awesome stuff you put into that script?

For example, where did you get this from:

Code:
if (type == 1/*minimized*/) {
Thank you very much!
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 05:03 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.