Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Suggestions ➜ MC Minimize to Tray option

MC Minimize to Tray option

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  3  4  5  

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Sun 14 Sep 2003 08:20 PM (UTC)
Message
How about a minimise to tray option?

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Dave   Australia  (93 posts)  Bio
Date Reply #1 on Sat 13 Mar 2004 02:09 PM (UTC)
Message
Why was this never replied to, Nick? Missed it? :).

It's a great idea, taskbar space is considered valuable real-estate by some, and minimising to the tray would be a great addition, and very easy to code.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #2 on Sat 13 Mar 2004 09:54 PM (UTC)
Message
Ah yes, missed that one. And how do you do it exactly?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Dave   Australia  (93 posts)  Bio
Date Reply #3 on Sun 14 Mar 2004 12:50 AM (UTC)
Message
You basically use Shell_NotifyIcon() with either NIM_ADD or NIM_DEL to add/remove the icon to/from the system tray, and ShowWindow() with SW_SHOW/SW_HIDE to show/hide it from the taskbar.

You use the uCallbackMessage variable of the NOTIFYICONDATA structure when using Shell_NotifyIcon() with NIM_ADD to select a user message to receive in your program, so if you defined WU_TRAY as (WM_USER + 1) (probably higher than this, no doubt you're using a few user messaages already :), and set .uCallbackMessage = WU_TRAY;, then you can capture messages in WU_TRAY (messages such as clicking to restore the window, or what have you). This is where you'd also handle right-clicking and the showing of a menu, if you added that.

As far as MFC goes, I have no idea, maybe there's a class? But this is how you do it with the API alone.

Also, somehow I doubt someone that can add all of MUSHclient's features and keep it stable will have little problem with such a simple, and common, piece of programming :P. HTH!
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #4 on Sun 14 Mar 2004 01:15 AM (UTC)
Message
True, kthx. I have the Visual Basic code if you need an example, should be a breeze to convert it to C++.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #5 on Mon 15 Mar 2004 05:43 AM (UTC)
Message
OK, thanks guys. I now have the basic concept working. But the question is, apart from having a nice icon there, what do you actually want it to do?

I can think of a couple of things:

Double-click

Restore MUSHclient window (if minimised) and bring to the front.

Left-click


  • Don't know for sure - maybe show a list of active worlds, with the count of unread lines, so you can switch to any world?
  • Some other thing?


Right-click


  • Show another menu - eg. the normal right-click menu for the active world?
  • Show a nested menu of all MUSHclient menus (eg, so you can do "new world", or "quick connect" or whatever.
  • Some other thing?


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Dave   Australia  (93 posts)  Bio
Date Reply #6 on Mon 15 Mar 2004 06:03 AM (UTC)
Message
I'm not sure if a context menu is really needed. What you do need is a global option that enables/disables minimising to the tray, but I'm sure you've already added that, or are adding it. I can't really think of anything you would need to quickly do with a right-click tray menu without opening up MUSHclient first.

One other thing you could do however, is the option for MUSHclient to always appear in the tray, and be able to enable/disable showing it on the taskbar. That's assuming what you're doing now is minimising to tray, then restoring the window, whilst removing the tray icon when it's restored?

So there should be perhaps three options:

  • Minimize to tray
  • Always show icon in tray
  • Hide program from task bar


I don't use "flashing" the task bar myself, but you could animate the tray icon instead of the task bar icon if the task bar slot isn't there. Of course, you would only be able to hide the program from the task bar if you're always showing the icon in the tray, otherwise you'd lose the program altogether! (except in the task manager)
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #7 on Mon 15 Mar 2004 07:45 AM (UTC)
Message
Are you sure? So if you turn off "minimize to tray" and turn on "hide program from task bar" then once the program is minimized it is "bye bye"?

Making "minimize to tray" merely a different sort of minimize is simple, so simple that I assumed you would want more, like some sort of menu or something.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Dave   Australia  (93 posts)  Bio
Date Reply #8 on Mon 15 Mar 2004 07:54 AM (UTC)
Message
The program goes "bye bye" as far as the user is concerned. If it's not on the task bar and not in the system tray, how do you bring it to the foreground unless you use the Task Manager or something similar? As I said in my first post in this thread, the main point, for me, was "task bar real-estate", so personally I wouldn't need a menu, but maybe Poromenos can think of a reason for one?
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #9 on Mon 15 Mar 2004 12:54 PM (UTC)
Message
Well, you could use radio style buttons to have three options:
Minimise to tray
Minimise to taskbar
Minimise to both

Or, use checkboxes, and have two options
Minimise to tray
Minimise to taskbar

If someone turned both off, he would effectively hide MUSHClient, and then he would perhaps cause it to reappear by launching it again (i mean that if you launched it again it would activate the old copy rather than run a new one). I think that the radio boxes are the best option, and there should also be a function to change MUSHClient's tray icon, so that you can maybe hide it from your *coughBOSScough*... As for the right click menu, I can't think of anything that would be useful, apart from Restore/Exit... Maybe you could just add the tray function for now and someone will come up with an idea...

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Linda   Sweden  (164 posts)  Bio
Date Reply #10 on Mon 15 Mar 2004 01:13 PM (UTC)
Message
I think it might be nice to have a context menu on left-click that shows a list of connected worlds and maybe marks those that have had activity in some way. Additionally, allowing you to select that world to maximize MUSHclient with that world as the active one could be good for 'stealthy' MU*ing. ;)
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #11 on Mon 15 Mar 2004 01:52 PM (UTC)
Message
See, ideas already :p
So you could have the menu show like:
1) My World 1*
2) My World 2*
3) Your world

and you could click on a window to activate and show MUClient, perhaps... The asterisk there means that there is new activity in that world... Or something like that, anyway.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #12 on Mon 15 Mar 2004 07:38 PM (UTC)

Amended on Mon 15 Mar 2004 07:40 PM (UTC) by Magnum

Message
Well, although showing worlds in a context menu could be useful, I would prefer it be even simpler than that:

When the user hovers the mouse over the icon, a tooltip appears listing the open worlds, with bold names being worlds that have had activity since minimizing.

A single left [primary] click should restore the program.

A single right [secondary] click could present a simple context menu:

    Open MUSHclient
[x] Minimize to System Tray
    Close MUSHclient
This assumes your options for minimizing are simply standard 'minimize to task bar', OR 'minimize to system tray'. (You could change the toggle via the menu when in Systray mode)

Now, if you really want to get creative, you could develop additional [animated?] icons, to represent different scenario's:

You might change the icon slightly if any world has had activity.

You might develop a whole series of icons (perhaps simply colour changes to the lamp), and allow the user to code icon changes via scripting. Eg: World.TrayIcon "1" or World.TrayIcon "red", etc...

If you added such a feature, you might also add a mother-flag that enabled/disabled icon usage. The user could decide if they wanted to allow scripts to change the icon. Under such a scenario, it would be sensible to also present that option in the right [secondary] click context menu I offered above.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #13 on Mon 15 Mar 2004 08:22 PM (UTC)
Message
Quote:

and there should also be a function to change MUSHClient's tray icon, so that you can maybe hide it from your *coughBOSScough*...


Got a bit of a cold Poromenos? ;)

Yes, well perhaps if you wanted to MUD away quietly the logical thing would be to have a tray icon that looks very similar to the "volume control" icon, which is normally in the tray. It is not that unusual for multiple tray items to appear when the system is undergoing one of its frequent, ah, idiosyncracies.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #14 on Mon 15 Mar 2004 09:19 PM (UTC)
Message
I will say I like magnums Idea of being able to change the look of the tray, that way, say you were being talked to or something, you could change the color of the tray to let yourself know this was happening and such.

Perhaps Nick, you could have a few different icons to choose from, a Boss one, a disconnected one, and then a normal one (the lamp?) which is somewhat changable.

mIRC does the minimize to tray thing nicely. At least, as far as the Icon goes with disconnecting, connecting, connected, activity, et al.

Also, some programs have been adding a fourth button on the top left, which is a minimize to tray icon, it looks like a dot on the bottom right sort of like the minimize button. Im sure you can find an example of what Im talking about.

I suppose if you really wanted to make it customizable, you could also support completely custom icons, basically display any small gif or whatever as the icon as well as the built in slew of MC ones.

(that way you have your command to change with arguements (Magnums Example), and then if you were custom, youd add a filename as well as the "custom" value)

I suppose a lot of that doesnt make complete sense.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


162,986 views.

This is page 1, subject is 5 pages long: 1 2  3  4  5  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.