VB.NET command to force window to top

Posted on 2004-10-26
Last Modified: 2007-12-19
Hi Everyone -

I am developing an instant messaging program for my office that is an upgrade of a similar application written in vb3.  One of the improvements I wish to make over the previous app is that when a user receives a new IM I want to force the window to the top of all currently visible windows so that the user will know right away that they are being sent a message... Does anyone know a event/command/way to make the window pop up over existing windows?  Any/all help on this is appreciated!

thanks in advance,
Question by:Kevin_S
    LVL 8

    Assisted Solution

    form.TopMost = True
    LVL 96

    Expert Comment

    by:Bob Learned

    LVL 1

    Author Comment

    thanks for the feedback - do these commands work as well in VB 6 or are these specific to VB.NET only?
    LVL 96

    Accepted Solution

    In VB6, the TopMost doesn't have an equivalent, but the BringToFront equivalent would be ZOrder.

    LVL 1

    Author Comment

    thanks for the help - I split the points between both as both supplied answered worked...

    thanks again,

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Suggested Solutions

    This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now