Solved

Minimize To Tray

Posted on 1998-09-22
5
440 Views
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?
0
Comment
Question by:cdc_sickle
  • 2
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
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
    Me.Hide
End If

End Sub

0
 
LVL 2

Expert Comment

by:evertd
ID: 1436109
look at the knowledge database of microsoft at www.microsoft.com/support it explains everything you need to know about tray icon.
0
 

Author Comment

by:cdc_sickle
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?
0
 
LVL 2

Expert Comment

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

Author Comment

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

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

744 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

10 Experts available now in Live!

Get 1:1 Help Now