messages in  c#

Posted on 2011-10-21
Last Modified: 2013-12-16
I have a winform form window open and want to set focus to it if it is not visible. Can I ]post a user message to its message pump?
Question by:BushBill
    LVL 47

    Expert Comment


    check if the  solution of this question could help you to bring it forth:
    LVL 85

    Accepted Solution

    Is another window in YOUR application currently focused?  If yes, then you can simply use BringToFront():


    If another application is currently focused then you may or may not need to resort to APIs as in the previous post.  It really depends on the Windows version and whether they have it set to prevent other applications from stealing focus.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video discusses moving either the default database or any database to a new volume.

    758 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

    10 Experts available now in Live!

    Get 1:1 Help Now