Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Windows Message Loop in .NET and C#

Posted on 2006-10-19
1
Medium Priority
?
1,136 Views
Last Modified: 2008-03-04
Is it possible to communicate with a .NET application by getting its windows handle and passing a value to it using PostMessage or SendMessage?

Does anyone have an example of the C# code that would handle a PostMessage call?
0
Comment
Question by:purplesoup
1 Comment
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 17766812
See:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclasswndproctopic.asp
   
    protected override void WndProc(ref Message m)
    {
        if (m.Msg==WM_XXX) { // trap your msg
            //do something in here...
        }
        base.WndProc(ref m);
    }
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

971 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