Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

minimizing a window on close

Posted on 2002-07-29
4
Medium Priority
?
158 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

636 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