ACC: How to Float MS Access Windows On Top of Other WindowsLast reviewed: November 12, 1997Article ID: Q101325 |
The information in this article applies to:
SUMMARYAdvanced: Requires expert coding, interoperability, and multiuser skills. With the Microsoft Access Popup property, you can create forms that "float" (that is, they stay on top of other forms) within Microsoft Access. However, if you set focus to a non-Microsoft Access application, the Microsoft Access popup forms are overlapped. If you want your Microsoft Access popup forms to stay on top of other non-Microsoft Access windows, you must call the Windows application programming interface (API) subroutine SetWindowPos(). This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual. NOTE: Visual Basic for Applications is called Access Basic in Microsoft Access versions 1.x and 2.0. For more information about Access Basic, please refer to the "Introduction to Programming" manual in Microsoft Access version 1.x or the "Building Applications" manual in Microsoft Access version 2.0.
MORE INFORMATIONTo make your form stay on top of non-Microsoft Access forms, call the following function from an event such as your form's OnOpen property. NOTE: In the following sample code, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this code in Access Basic. You may have some Windows API functions defined in an existing Microsoft Access library; therefore, your declarations may be duplicates. If you receive the duplicate procedure name error message, remove or comment out the declarations statement in your code.
To Float Any Other ApplicationTo float any other application on top of another application, such as floating the Windows Calculator, you can use SetWindowsPos() along with the FindWindow() Windows API function as demonstrated below. NOTE: In the following sample code, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this code in Access Basic.
? Float_Calc()NOTE: CALC.EXE is an application that comes with Windows and should be in your Windows directory.
REFERENCES"Microsoft Windows Programmer's Reference, Volume 2: Functions," version 3.10
|
Additional query words: float
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |