Microsoft KB Archive/149225

= ACC95: Run-Time Background Is Transparent with Secured MDW =

Article ID: 149225

Article Last Modified on 11/17/2000

-

APPLIES TO


 * Microsoft Access 95 Standard Edition

-



This article was previously published under Q149225





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:

  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%)   Type the following function:

Function MinAndMax Dim ActiveWnd%, Minit%, Maxit% ActiveWnd% = GetActiveWindow Minit% = ShowWindow(ActiveWnd%, 2) ActiveWnd% = GetActiveWindow Maxit% = ShowWindow(ActiveWnd%, 3) End Function   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: kbbug kbfix kbui KB149225

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.