Is form minimized

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?
 
P

Peter De Baets

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top