Microsoft KB Archive/95329

{|
 * width="100%"|

INF: How to Determine Whether a Form Is Minimized
'Article ID: Q95329

Creation Date: 07-FEB-1993

Revision Date: 19-SEP-1996' The information in this article applies to:


 * Microsoft Access versions 1.0, 1.1, 2.0

SUMMARY

Advanced: Requires expert coding, interoperability, and multiuser skills.

Microsoft Access does not include an intrinsic function to indicate whether a form is minimized; however, you can use the IsIconic function in the Microsoft Windows application programming interface (API) to determine whether a form is minimized. This article demonstrates how to do so.

MORE INFORMATION

The following code example demonstrates declaring and calling the IsIconic function from Access Basic. The argument to IsIconic is the handle of the form the state of which you would like to know. IsIconic returns 1 if the form is minimized or 0 (zero) if the form is not minimized.

'=================================================  'GLOBAL DECLARATION SECTION '=================================================  Option Explicit Declare Function IsIconic% Lib &quot;User&quot; (ByVal hwnd%)

'======================================================  ' w_IsIconic '  ' This function returns the window state of a form. '  ' Return value: '  1 - Form is minimized. '  0 - Form is not minimized. '======================================================

Function w_IsIconic w_IsIconic = IsIconic(Forms!Form1.hwnd) End Function REFERENCES

Microsoft Windows Software Development Kit &quot;Programmer's Reference, Volume 2: Functions,&quot; version 3.1, pages 555-556
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

Additional reference words: 1.00 1.10 2.00

KBCategory: kbprg kbhowto

KBSubcategory: PgmApi