Tray Minimizer

Developed or developing a new product in PureBasic? Tell the world about it.
r_hyde
Enthusiast
Enthusiast
Posts: 155
Joined: Wed Jul 05, 2006 12:40 am

Tray Minimizer

Post by r_hyde »

I wanted to be able to always minimize certain applications to the system tray, and wasn't totally satisfied with any of the shareware tools I tried for this. Mainly, I didn't want to have to remember special keyboard shortcuts (I just want to use the regular ol' minimize button), and I didn't want to have to pay to register something that I could simply write for myself :P

As a result, here is my ultra-simple-no-frills Tray Minimizer! It creates its own icon in the systray, which you can double-click to open a window where you can add other applications you want always minimized to the tray. It's not really complete in the "professional software" sense, but I got it about as finished as I need it to be, and I figured I'd post it up here with source as a gift to a wonderful community (aww, can you feel the love?). Feel free to implement any missing or desired functionality, but please note the very liberal license statement in the opening comments in my source.

Special thanks to Sparkie, without whose help I probably would've got this thing written anyway, but it wouldn't have been as easy 8)

File:1->TrayMinimizer.zip
Image
Last edited by r_hyde on Wed Sep 26, 2007 4:50 am, edited 1 time in total.
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

Looks very nice.

Thanks for sharing with us :)

cheers

whoops - seems to be consuming quite a bit of the cpu - 80+% ?

Vista business
r_hyde
Enthusiast
Enthusiast
Posts: 155
Joined: Wed Jul 05, 2006 12:40 am

Post by r_hyde »

Fixed. I usually throw a Delay() into my main loop to prevent this, but this time I forgot.
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

Yes, much better :)

Thanks again for sharing this.

cheers

If you get bored, drag and drop would be nice :)
r_hyde
Enthusiast
Enthusiast
Posts: 155
Joined: Wed Jul 05, 2006 12:40 am

Post by r_hyde »

I don't think I'll be implementing drag/drop - that's why I published the source, so that features like this can be added by whoever is willing and able. I appreciate that you took the time to check it out, though, and thanks for the nice comments!
User avatar
HeX0R
Addict
Addict
Posts: 1204
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Post by HeX0R »

Just took a quick look at your code, cause i wondered, why you should need a Delay() for this kind of application.
I don't see any reason to use WindowEvent() (as you did) instead of WaitWindowEvent() which should be the way to go.

And btw, it seems you used some userlib, my PB doesn't know a procedure called HandleToFileName().
r_hyde
Enthusiast
Enthusiast
Posts: 155
Joined: Wed Jul 05, 2006 12:40 am

Post by r_hyde »

Thanks, you're correct - that function is from droopy's lib. I sometimes forget when I'm using 3rd party libs. Sorry 'bout that!

I also always manage to forget about WaitWindowEvent() :(
Post Reply