Library tutorials & articles
API Programming Series #3 - Bring a Window to Top
- Introduction
- The code
- Analysis
- Conclusion
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.
Related articles
Related discussion
-
Run-time error '91'
by converter2009 (1 replies)
-
VB6 Runtime error 381 subsript out of range Error
by Uncle (2 replies)
-
passing and reading parameters from using Shell
by jigartoliya (0 replies)
-
Convert C++ code to VB6
by mawcot (4 replies)
-
listbox scrollbar
by Dennijr (10 replies)
Related podcasts
-
Christian Beauclair
14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...
Are you using IE?
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?
This thread is for discussions of API Programming Series #3 - Bring a Window to Top.