How to receive message in NotifyIcon

C

Chanh Nguyen

Hi all,

I have a problem.

I want an application that sends a message to a NotifyIcon application (Tray Icon).
I have a form MainFrm that will create the NofifyIcon.

[STAThread]
static void Main()
{
Application.Run (new MainFrm());
}

public void MainFrm_Load(object sender, System.EventArgs e)
{
this.Visible = false;

... show NotifyIcon
}

And I do override WndProc of MainFrm in order to capture the comming messages.
protected override void WndProc(ref Message m)
{
//My code here
base.WndProc(m);
}
At first, I think I will capture the comming message.
In fact, I don't receive any.

What will I do to get the message?

When I remove the NotifyIcon, I can receive the message in WndProc()

Thanks all,
Chanh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top