Minimize To Tray

Posted on 1998-09-22
Last Modified: 2010-04-30
How would i minimize a program so it minimizes to the tray, or how could i do this: when the user clicks the forms minimize buttons, or on form minimize, instead of minimizeing, it hides the form, cause i know how to do the icon in the tray thing?
Question by:cdc_sickle
  • 2
  • 2

Accepted Solution

BergJC earned 50 total points
ID: 1436108
Put this code in your Form_Resize function and it will hide the form when you minimize it:

Private Sub Form_Resize()
If Form1.ScaleHeight = 0 And Form1.ScaleWidth = 0 Then
End If

End Sub


Expert Comment

ID: 1436109
look at the knowledge database of microsoft at it explains everything you need to know about tray icon.

Author Comment

ID: 1436110
Ok, that worx but... How do i bring it back in the sysMnuTray popup menu
i have a thing in it called open
what code do i put in there to bring it back?

Expert Comment

ID: 1436111
To bring it back, just put the command "YourFormName.Show"  wherever you want the form to reappear.

Author Comment

ID: 1436112
i did that but it blinks in the 0,0 possition in the screen and then hides again

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now