Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine if Form is Minimized

Status
Not open for further replies.

illini

Technical User
Aug 2, 2002
89
0
0
FR
Is it possible to determine if a form is minimized via VBA?

I have a form with a listbox which I would like to resize once a pop-up form has been minimized or maximized.

Thanks.

-illini
 
You could try using the InsideHeight property of the form, I assume it would be zero if the form is minimized.

You should play around with that to see if it will work for you.
 
I think a found a relatively simple solution which uses a form's WindowWidth property.

I discovered that when a form is minimized (at least on my database), the form's WindowWidth = 1920. So, here's the sub I developed to determine if a form is minimized...

Sub Determine_Form_Min()
For Each dbsform In Access.Forms
If Forms(dbsform.Name).WindowWidth = 1920 Then
‘Execute your code here
End If
Next dbsform
End Sub


-illini
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top