Sample Applications A-41
lblStatus.Text = ""; // Initialize Status Field
txtScanData.Text = "";
// Initialize Barcode Data field
txtScanType.Text = "";
// Initialize Barcode Type Field
txtScanLength.Text = "";
// Initialize Barcode Length field
txtScanData.Focus(); // Set focus to Scan Data field
Cursor.Current = Cursors.Default;
// Change Cursor Back to Default
lblStatus.Text = "Ready"; // Inform user it is ready
this.Refresh(); // Refresh the Screen
}
} // public class Form1 : System.Windows.Forms.Form
public class MyMessageWindow :
Microsoft.WindowsCE.Forms.MessageWindow
{
// Message IDs received from scanner
public const UInt32 SM_SCANCHAR = 0x3000;
// incomming scanner char msg
public const UInt32 SM_SCANSTATUS = 0x3001;
// incomming scanner status msg
public int count = 0;
// initialize count
public const string STR_SCANMSG = "Paxar Scanner
Interface";
public string strScanData;
// Class based variables
private UInt32 unScanMsgID;
// Message ID to use for broadcast
private Form1 objForm;
[DllImport("coredll.dll", SetLastError = true)]
private static extern int RegisterWindowMessage(string
strMessage);