?
Solved

minimizing a window on close

Posted on 2002-07-29
4
Medium Priority
?
157 Views
Last Modified: 2010-05-18
Hi,

How to minimize (keep the form active) even after u have pressed the closed button.
Just like in MSN or Yahoo messenger when ever u press the close button...the form doesnt get unloaded but it remains active in the System tray.

Thanks in advance.

Chintamani.
0
Comment
Question by:chintamanidhotre
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
sanjaykattimani earned 400 total points
ID: 7184901
Write the following in form's query unload event it'll b minimized


Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Cancel = 1          'Avoids closing of the window
Me.WindowState = 1  'Minimizes the window
End Sub

0
 
LVL 15

Expert Comment

by:mohan_sekar
ID: 7184902
Hi,

     Try using ShellNotifyIcon API to load ur form in the system tray.

bye

Mohan
0
 

Author Comment

by:chintamanidhotre
ID: 7184923
Thanks sanjay for the prompt and correct answer.
0
 
LVL 3

Expert Comment

by:sanjaykattimani
ID: 7184956
:) My pleasure.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

777 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