LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-17-2006, 10:39 AM   #1
kamransoomro84
Member
 
Registered: Feb 2004
Location: Pakistan
Distribution: OpenSUSE 10.2
Posts: 241

Rep: Reputation: 30
Placing your program in the system tray


Hi. I want to minimize my program to the system tray and remove it from the traskbar in Windows. I'm using Java. How can I do it? Help would be appreciated. Thanks.
 
Old 03-18-2006, 05:01 PM   #2
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,694

Rep: Reputation: 45
moving to programming
 
Old 03-19-2006, 12:41 AM   #3
kamransoomro84
Member
 
Registered: Feb 2004
Location: Pakistan
Distribution: OpenSUSE 10.2
Posts: 241

Original Poster
Rep: Reputation: 30
Uh, hello. Anyone?
 
Old 03-19-2006, 12:57 AM   #4
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 56
This is a Windows question in a linux forum, don't expect a flood of answers because a lot of us don't even run Windows...

I don't know much of Java but I can point you to Mercury and Azureus, both are Java apps, both run under Windows and linux and both have put an icon in the system tray. Maybe check the source for them and see how they do it.
 
Old 03-19-2006, 07:14 AM   #5
FLLinux
Member
 
Registered: Jul 2004
Location: USA
Distribution: Fedora 9, LFS 6.3, Unbuntu 8.04, Slax 6.0.7
Posts: 145

Rep: Reputation: 15
In windows or i shold say MFC there is a think called SystemNotifyIcon or something like that. You create one of these and attach a menu to it and set some other options and with you mimimize you prgram it will show up on the Systemtray instead of the taskbar. I don't know how Java does it since ths is a Windows specific thing (and it is a pain in the butt to work with). But look for something along those lines
 
Old 03-20-2006, 01:53 AM   #6
slantoflight
Member
 
Registered: Aug 2005
Distribution: Smoothwall
Posts: 283
Blog Entries: 3

Rep: Reputation: 35
Quote:
Originally Posted by FLLinux
In windows or i shold say MFC there is a think called SystemNotifyIcon or something like that. You create one of these and attach a menu to it and set some other options and with you mimimize you prgram it will show up on the Systemtray instead of the taskbar. I don't know how Java does it since ths is a Windows specific thing (and it is a pain in the butt to work with). But look for something along those lines
Its actually not a purely windows feature. I've seen azureus minimize to a KDE system tray. Andit works for fluxbox box too.
See

http://img65.imageshack.us/img65/1198/azureus0gv.jpg

I do believe the code maybe as simple one line


SystemTray.getDefaultSystemTray().addTrayIcon(new TrayIcon(new ImageIcon("imagefilename")))
 
Old 03-20-2006, 03:41 PM   #7
DanTaylor
Member
 
Registered: Jan 2006
Distribution: Debian Sarge
Posts: 265

Rep: Reputation: 30
How would this be done in KDE???
 
Old 04-30-2007, 05:28 AM   #8
medya
Member
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 87

Rep: Reputation: 15
there is a program which minimized programs to tray and it works so easily , the program is AllTray

Enjoy !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Make shortcut to tray for a program loninappleton Linux - Newbie 4 10-27-2005 10:22 PM
Need a System Tray? drj000 Linux - Software 7 01-19-2005 07:47 PM
Things for KDE system tray in gnome system tray Boffy Linux - General 3 09-17-2004 07:56 AM
RH.9 System Tray ganninu Linux - Newbie 2 10-17-2003 03:30 PM
System tray floyd Linux - Newbie 2 09-01-2003 10:19 AM


All times are GMT -5. The time now is 12:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration