Is form minimized

  • Thread starter Thread starter Dale Fye
  • Start date Start date
D

Dale Fye

I have use the SetAccessWindow to hide the Access window
from my users. I gave them a minimize button on most of
the forms to allow them to minimize the form.

However, I have some code that runs on the Timer event of
one of the forms, and I want to determine whether the form
is minimized or visible in normal view. Anybody know of a
way to test to see what the forms "state" is?
 
Put this in your declarations section:

Declare Function apiIsIconic Lib "user32" Alias "IsIconic" (ByVal hwnd
As Long) As Long

Then you can use this call to determine if your form is minimized:

If apiIsIconic(Me.hwnd) Then
'Minimized
Else
'Not minimized
End If

Hope this helps,

Peter De Baets
Peter's Software - MS Access Tools for Developers
http://www.peterssoftware.com
 
Thanks,

Exactly what I needed.

Peter De Baets said:
Put this in your declarations section:

Declare Function apiIsIconic Lib "user32" Alias "IsIconic" (ByVal hwnd
As Long) As Long

Then you can use this call to determine if your form is minimized:

If apiIsIconic(Me.hwnd) Then
'Minimized
Else
'Not minimized
End If

Hope this helps,

Peter De Baets
Peter's Software - MS Access Tools for Developers
http://www.peterssoftware.com
 
Back
Top