Message Window Problem! Please Help

Hi All,
I am quite fresh in NetCF. I do face some problem regarding Message Windows is using.
My device OS Windows CE .Net 4.2 with built in barcode scanner. These are my code:
In the Class file,
public class myMessageWndMain : MessageWindow
{
frmMain app;
public const int WM_USER = 0x400;
public const int WM_SCAN_DATA = WM_USER+100;
//public const int WM_DATA_SCANINIT_START=WM_USER+101;
//public const int WM_DATA_SCANINIT_END=WM_USER+102;
public myMessageWndMain(frmMain app)
{
this.app=app;
}

protected override void WndProc(ref Message m)
{

switch(m.Msg)
{

case WM_SCAN_DATA:
app.GetScanData();
break;
/*
* case WM_DATA_SCANINIT_START:
app.SetStatusText(true);
break;
case WM_DATA_SCANINIT_END:
app.SetStatusText(false);
break;
*/
}

base.WndProc (ref m);

}
}

In my form when form load,
myMessageWndMain msgWnd = new myMessageWndMain(this);

My application can step into the WndProc and get the info at the first few times when i press the scan button. But after a few times it is execute, my message window fail to get the value, but i still can get the scan value from the dll it come together. There is no problem with the dll to get the value from scanner. It is just the Message Windows fail to capture the value. After i indent some of the logic/action would carry after scanning, the frequently for Message Windows to get the value increase to more than 10 times. I feel like it is because of the resource or garbage collector problem. Anyone can help? Maybe i should try to dispose or fresh it? I am using C#. All suggestions is really appreciate. Thanks a lot!

[1752 byte] By [Pony] at [2007-12-16]
# 1
Are you updating the UI controls in your SetStatusText method?
If the answer is yes, then you must use the Control.Invoke for that.
AlexY at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...
# 2
Thanks Alex,
I had indent all those SetStatusText in my class and form. Seem likes nothing to do with the code, am i right?
Pony at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...