Access minimized

  • Thread starter Thread starter Jonathan
  • Start date Start date
J

Jonathan

Hello,
How can I detect in VBA code if Access is running minimized?

Thanks
Jonathan
 
Public Declare Function IsIconic Lib "user32.dll" (ByVal hWnd As Long) As
Long

Function AccessIsMimized() As Boolean
AccessIsMinimized = IsIconic(Application.hwndAccessApp) ' Acc 2000 +
End Function
For '97 an earlier Find the hWnd from http://www.mvps.org/access/api

HTH

Pieter
 
Hi Pieter,

Nice function, except I think you wanted:

Function AccessIsMinimized() As Boolean

instead of:
Function AccessIsMimized() As Boolean

....to avoid a compile error that is revealed only if you have Option
Explicit included.

Always Use Option Explicit
http://www.access.qbuilt.com/html/gem_tips.html#VBEOptions


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 

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

Back
Top