BUG: TopMost Window Does Not Stay on Top in Design EnvironmentLast reviewed: November 19, 1996Article ID: Q150233 |
The information in this article applies to:
SUMMARYThe SetWindowPos API function can be used to set a window so that it stays on the top of all other windows. However, the window will not stay on top in the Visual Basic design environment.
STATUSMicrosoft has confirmed this to be an issue in the Microsoft products listed at the beginning of this article. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
WORKAROUNDThere is no workaround to keep a window TopMost while in the Design Environment. However, when the application is compiled to an EXE, invoking the SetWindowPos function to keep a Visual Basic form TopMost will correctly work.
MORE INFORMATIONIn the Design environment, making a form TopMost causes it to stay on top of other Visual Basic Design Environment windows, such as the Properties window and Debug window until another application is switched to. Once another application has been made active, the form in Visual Basic loses its TopMost attribute, and when the focus returns to Visual Basic, it even stays behind the other windows within Visual Basic. To see how the SetWindowPos API function can be applied to keep a window TopMost, please see the CallDLLs sample located in the vb\samples\calldlls directory. The declaration for the function is in the Declares.bas file, and the call to SetWindowPos is located in the mnuSysInfo_Click event contained in the frmMenus form.
Steps To Reproduce
|
Additional reference words: 4.00 vb4win vb4all
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |