ACC95: Run-Time Background Is Transparent with Secured MDW

Last reviewed: May 21, 1997
Article ID: Q149225
The information in this article applies to:
  • Microsoft Access version 7.0

SYMPTOMS

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

In the Microsoft Access run-time environment, when you use a workgroup file that has Microsoft Access security enabled, the background of Microsoft Access will be transparent each time you start the application. Because of this, the window or program that is being displayed in the background will be visible. The only Microsoft Access components displayed will be the database's startup form and the Microsoft Access title and menu bars. This behavior occurs when running Microsoft Access in both Windows 95 and Windows NT.

RESOLUTION

Minimizing and maximizing Microsoft Access will force the background to be redrawn and be displayed correctly.

Use Windows API calls in Microsoft Access modules to maximize, minimize, and restore Microsoft Access. Once the following sample functions are defined in a module, you can use them in macros as RunCode actions. Define the functions with these steps:

  1. Create a new module and type the following lines in the Declarations section if they are not already there:

          Option Explicit
          Declare Function GetActiveWindow% Lib "User32" ()
          Declare Function ShowWindow% Lib "User32" (ByVal hWnd%, ByVal _
    
             nCmdShow%)
    
    

  2. Type the following function:

          Function MaxAndMin()
    
             Dim ActiveWnd%, Minit%, Maxit%
             ActiveWnd% = GetActiveWindow()
             Minit% = ShowWindow(ActiveWnd%, 2)
             ActiveWnd% = GetActiveWindow()
             Maxit% = ShowWindow(ActiveWnd%, 3)
          End Function
    
    

  3. Create the following macro action and save the macro as AutoExec:

          Macro Name  Macro Action
          ------------------------
    
          AutoExec    RunCode
    
          AutoExec Actions
          ----------------
          RunCode:
             Function Name: MinAndMax()
    
    
NOTE: This behavior is also resolved by maximizing and then restoring the startup form in the autoexec macro.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 7.0. This problem no longer occurs in Microsoft Access 97.


Additional query words: ADT Developer's Toolkit refresh redraw display
repaint
Keywords : kbui UifOthr
Version : 7.0
Platform : WINDOWS
Hardware : X86
Issue type : kbbug
Resolution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" 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.

Last reviewed: May 21, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.