Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 44,044 times

Contents

Related Categories

API Programming Series #3 - Bring a Window to Top - Analysis

sreejath

Analysis

Let us see how this works.

The API function BringWindowToTop accepts the hwnd (Handle to the Window, a unique id that all windows have) of the window that is to be brought on top. It brings the specified window to the top of the Z order. If the window is a top-level window, it is activated. If the window is a child window, the top-level parent window associated with the child window is activated.

While adequate for the purpose of explaining the function, the above example is rather trivial in nature. I.e. it doesn't achieve anything practical. So what would be a practical application for this? Hmmm... Say, you've got a long process running in a window. Naturally you can expect your users to switch to other windows during this period. However, once the process is complete you may want to put this window on top. In such a case this code can be put to use.

Comments

  • Posted by sreejath on 31 Mar 2003

    Are you using IE?

  • Well, almost...

    Posted by mef on 25 Feb 2003

    Using VB6 in Windows 2000 this function brings my window to the top of other application windows, but will not bring it above a browser window. Any suggestions?

  • another nice 1

    Posted by fanen on 10 Jan 2003

    i've always used "form1.setfocus"....and most times, it just blinked the app in the taskbar...