I was writing a small program in Visual C# 2010 to ultimately be loaded on a handheld scanner with WinCE 5. Works great in 2010.
Come to find out, I needed to use the 2005 version. So I copied my code over to 2005, and now the TextChanged event doesn't trigger. I have tried it in a regular Windows App in 2005 as well, with the same results. The data goes into the textbox just fine, but changing the text doesn't trigger the event.
I have a textBox with this code attached. I test it in Windows by just Ctrl-V the data into it and it would trigger fine. In 2010, works great, not in 2005. On the handheld, the scanner will put info in this box.
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text.Length > 0)
{
scanCode = ReadCode();
if (scanCode == null)
{
button1.Text = "Wrong Barcode - Try Again";
button1.BackColor = System.Drawing.Color.Red;
log.WriteLine(DateTime.Now);
log.WriteLine("Invalid Barcode scanned");
log.WriteLine("Code = " + scanCode);
log.WriteLine();
log.Flush();
}
else
{
ProcessScan();
}
}
}
Anyone know of any differences between the versions that would keep this from triggering? Any help is greatly appreciated.