topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 15, 2024, 11:37 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: How to run a program and minimize it?  (Read 5254 times)

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
How to run a program and minimize it?
« on: October 12, 2009, 09:57 PM »
There's this program Billy that gets minimized to system tray when the minimize button is clicked. I would like to launch this program and have it immediately minimized to sys tray. So I created a shortcut to it and set it to run minimized via the shortcut properties. However when it is launched via this shortcut, it doesn't go to the tray instead appears like this:

BillyMinimized.png

Is there a fix to this natively in Windows other than having to depend on writing a macro using AutoHotKey or otherwise?
<a href="https://sridharkatakam.com">My blog</a>

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: How to run a program and minimize it?
« Reply #1 on: October 12, 2009, 11:29 PM »
When programs override the minimize, maximize or close buttons on the frame, there's no standardized way that I've found to predict what action will happen or if it will detect the current state it is in if it didn't cause it internally.

I wrote a "single instance" component where I try to maximize the already running instance before the second instance quits. In the end I had to add an option to turn that attempt off because it could produce weird results like what you mention here. If the program minimized "normally" with a button on the taskbar, usually things worked as expected.  But if the program minimized to tray, once you acted on it from outside all bets were off.

About all I can suggest is mess with it by sending it Hide and Show messages, if it has a System Menu, try that and see what happens.

I just messed around with Gigaget download manager which has no option to start in the tray that I know of, but if you click the 'x' on the frame, it will minimize to tray with no task bar button.  Great.  So I send it a 'hide' msg with NirCmd.  Now it won't open normally.  The only solution was to run another program that made Gigaget the active window and sent it an Alt-F4 since it handled that as minimize to tray also.

Every program is going to be different. Unless you run one of those monitor things that can figure it out, then it's pretty much trial and error.

At least afaik.  I haven't done one of those tray minimizer hider apps. Someone that has will likely have more insight.

« Last Edit: October 12, 2009, 11:32 PM by MilesAhead »