Minimize to Tray Button

  • Thread starter Thread starter zakhirn
  • Start date Start date
Z

zakhirn

Anyone have code that creates a button that will Minimize Excel to the
system tray.

I do not need anything complicated like changing the minimize button or

the close button to a minimize to tray button. I have a Form that pops
up when excel loads, and I will add a command button called Minimize
that I just want to minimize excel to the system tray.


Thanks for your help.
 
Anyone have code that creates a button that will Minimize Excel to the
system tray.

There's no way to really minimize a window to the notification area
(aka system tray). The notification area contains only icons, they can
represent anything and are not necessarily associated with a specific
window. What applications do is

1) Add a notification icon with the NotifyIcon class.
2) Override the minimization of the window and hide it instead so no
animation to the taskbar appears and removes the taskbar button if
there is one.
3) Optionally, use the DrawAnimatedRects Win32 API to make it look
like the window really is getting minimized to the notification area


Mattias
 
Back
Top