Declare Function BringWindowToTop Lib "user32.dll" (ByVal hwnd As Long) As Long
BringWindowToTop brings a specified window to the top of the Z-order, placing it above any windows previously on top of it. This function has the same effect as using SetWindowPos to place the window at the top of the Z-order.
If an error occured, the function returns 0 (use GetLastError to get the error code). If successful, the function returns a non-zero value.
None
' This code is licensed according to the terms and conditions listed here.
' Bring the window Form1 to the top of the Z-order.
Dim retval As Long ' return value
' Obviously, this will only do something if other windows are already on top of Form1.
retval = BringWindowToTop(Form1.hWnd)
Go back to the alphabetical Function listing.
Go back to the Reference section index.
Last Modified: July 28, 1999
This page is copyright © 1999 Paul Kuliniewicz.
Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/b/bringwindowtotop.html