ACC95: Run-Time Background Is Transparent with Secured MDW

ID: Q149225


The information in this article applies to:


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 MinAndMax()
             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 runtime


Keywords          : kbui UifOthr 
Version           : 7.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: April 23, 1999