Y
yusuf
Hey guys,
I have 2 CF apps where one sends message and the other listens
through a messagewindow. The problem occurs when focus is taken away
from the listener app (e.g. by starting up another app), from that
point on the messagewindow
no longer receives messages even though the sender app is still
sending them. I was wondering if any of you have run into this problem
or have ideas as to what's going on.
Yusuf
Here is some of the code that does the communication:
sender:
Win32_PostMessage(new
IntPtr(HWND_BROADCAST),RegisterWindowMessage(TRIGGER),0, IntPtr.Zero);
receiver (the messagewindow is created in a form):
private int WM_TRIGGER_ID = -1;
public myMessageWindow()
{
WM_TRIGGER_ID = RegisterWindowMessage(TRIGGER)
}
protected override void WndProc(ref Message msg)
{
if (msg.Msg == WM_TRIGGER_ID)
//do stuff
base.WndProc(ref msg);
}
I have 2 CF apps where one sends message and the other listens
through a messagewindow. The problem occurs when focus is taken away
from the listener app (e.g. by starting up another app), from that
point on the messagewindow
no longer receives messages even though the sender app is still
sending them. I was wondering if any of you have run into this problem
or have ideas as to what's going on.
Yusuf
Here is some of the code that does the communication:
sender:
Win32_PostMessage(new
IntPtr(HWND_BROADCAST),RegisterWindowMessage(TRIGGER),0, IntPtr.Zero);
receiver (the messagewindow is created in a form):
private int WM_TRIGGER_ID = -1;
public myMessageWindow()
{
WM_TRIGGER_ID = RegisterWindowMessage(TRIGGER)
}
protected override void WndProc(ref Message msg)
{
if (msg.Msg == WM_TRIGGER_ID)
//do stuff
base.WndProc(ref msg);
}