ACC: How to Minimize, Maximize, and Restore MS Access (1.x/2.0)ID: Q89597
|
Advanced: Requires expert coding, interoperability, and multiuser skills.
To maximize, minimize, and restore Microsoft Access, you can use Microsoft
Windows application programming interface (API) calls in Microsoft Access
modules. Microsoft Access does not provide a function to perform these
actions in a module or macro.
Once you define the following sample functions in a module, you can use
them in macros as RunCode actions. To define the functions, follow these
steps:
Declare Function GetActiveWindow% Lib "User" ()
Declare Function ShowWindow% Lib "User" (ByVal hWnd%,_
ByVal nCmdShow%)
Function MaximizeAccess ()
Dim ActiveWnd%, Maxit%
ActiveWnd% = GetActiveWindow()
Maxit% = ShowWindow(ActiveWnd%, 3)
End Function
Function MinimizeAccess ()
Dim ActiveWnd%, Minit%
ActiveWnd% = GetActiveWindow()
Minit% = ShowWindow(ActiveWnd%,2)
End Function
Function RestoreAccess ()
Dim ActiveWnd%, Restoreit%
ActiveWnd% = GetActiveWindow()
Restoreit% = ShowWindow(ActiveWnd%, 1)
End Function
Action FunctionName
-----------------------------
RunCode MinimizeAccess()
For an example of how to maximize, minimize, and restore Microsoft Access
in Microsoft Access for Windows 95 version 7.0 and Microsoft Access 97,
please see the following article in the Microsoft Knowledge Base:
Q148834 ACC: How to Minimize, Maximize, and Restore MS Access 95/97
"Microsoft Windows Software Development Kit," Microsoft Press, 1992
"Programming Windows: the Microsoft Guide to Writing Applications for
Windows 3," Charles Petzold. Microsoft Press, 1990
"Programmer's Reference Library: Microsoft Windows 3.1 Guide to
Programming Reference" Volumes 1-6, Microsoft Press, 1992
Keywords : kbprg
Version : 1.0 1.1 2.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: March 9, 1999