Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Simple: When programs are minized...

Posted on 2004-03-21
6
Medium Priority
?
185 Views
Last Modified: 2010-05-01
Hello, I want to be able to run some code when the user minimizes the program, i know this can be done because it happens on a lot of programs.  I want to hide the form when this happens because it resedents in the system tray.  So all i need is how to figure out when it is minized.

Thanks...
0
Comment
Question by:clear100-com
[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
  • 3
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
___XXX_X_XXX___ earned 100 total points
ID: 10643916
Private Sub Form_Resize()

If Me.WindowState = vbMinimized Then
   MsgBox "Run your code here"
End If

End Sub
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 10643931
Private Sub Form_Resize()
    If Me.WindowState = vbMinimized Then
        Me.Hide
    End If
End Sub

DON'T ACCEPT THIS AS AN ANSWER!!!

Accept the solution from ___XXX_X_XXX___

Idle_Mind


0
 

Author Comment

by:clear100-com
ID: 10643976
see i knew this, but i just was too tired or somthing, thanks.!!!
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 6

Expert Comment

by:___XXX_X_XXX___
ID: 10644002
Idle_Mind,
Why not to accept your code ? It's correct solution also.
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 10649069
Because I just changed one line in your code which I think clear100-com would have known to do.  Your answer had the main part of the solution...my poor brain just couldn't leave the question without posting the complete answer.

You posted first so I felt you should get the points.

Idle_Mind
0
 
LVL 6

Expert Comment

by:___XXX_X_XXX___
ID: 10649631
:) 10x
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. 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

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Suggested Courses

722 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