C# VS.Net 2003 + .Net CF MessageWindow + DataSet problem!
My device is running under Windows CE .Net 4.2 with a built in barcode scanner. I found a problem over my .Net CF application which developed in C#. I do create a message window in a class like below to getting the value my barcode scanner get when scan key press.
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;
}
base.WndProc (ref m);
}
}
In my frmMain_Load, include this
myMessageWndMain msgWnd = new myMessageWndMain(this);
At the first few times when the particular key press, and my scanner get the value, my application still able to step into/proceed into protected override void WndProc(ref Message m).Butafter a few times i press my insert button(UI) which perform a dataset and also dataset.writexml, my application fail to step into/proceed into protected override void WndProc(ref Message m)when i pressed my scan button. No matter how i tried. My scanner able to get the value, just because my code cant step into protected override void WndProc(ref Message m). If i indent all my dataset and write xml code, it able to step into protected override void WndProc(ref Message m)and call myGetScanData()to capture the scan value, even ten hundred times. I had tried my best to do everything i can, but i cant solve. Is any expert here can help me on this? A thousand thanks for every single reply.
Is it related to any resourcesof object/GC(garbage collector) problem?

