Windows API Guide: Reference: Callback Functions


Declare Function BringWindowToTop Lib "user32.dll" (ByVal hwnd As Long) As Long

Platforms

  • Windows 95: Supported.
  • Windows 98: Supported.
  • Windows NT: Requires Windows NT 3.1 or later.
  • Windows 2000: Supported.
  • Windows CE: Requires Windows CE 1.0 or later.

Description & Usage

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.

Return Value

If an error occured, the function returns 0 (use GetLastError to get the error code). If successful, the function returns a non-zero value.

Visual Basic-Specific Issues

None

Parameters

hwnd
A handle to the window to bring to the top of the Z-order.

Example

' 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)

See Also

SetWindowPos

Category:

Windows

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



Windows API Guide
Windows API Guide - Reference - Volume 1: Version 3.0 For the MS-DOS and PC-DOS Operating Systems
ISBN: B001V0KQIY
EAN: N/A
Year: 1998
Pages: 610

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net