Solved

Minimize To Tray

Posted on 1998-09-22
5
443 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

856 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