MagTek 99875125 User Manual
Page 62

MagTek Device Drivers for Windows
//
this.lblOpenResults.AutoSize = true;
this.lblOpenResults.Location = new System.Drawing.Point(8, 64);
this.lblOpenResults.Name = "lblOpenResults";
this.lblOpenResults.Size = new System.Drawing.Size(68, 13);
this.lblOpenResults.TabIndex = 12;
this.lblOpenResults.Text = "Open results";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(496, 267);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.lblOpenResults,
this.txtOpenResults,
this.axMSComm1,
this.lblSelComPort,
this.nudComPort,
this.btnClose,
this.txtResponse,
this.lblResponse,
this.btnSend,
this.lblCommand,
this.txtCommand,
this.btnOpen});
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.nudComPort)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.axMSComm1)).EndInit();
this.ResumeLayout(false);
}
#endregion
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
//
// Open the comm (MTD) port
//
private void btnOpen_Click(object sender, System.EventArgs e)
{
if(axMSComm1.PortOpen)
{
axMSComm1.PortOpen = false;
}
axMSComm1.CommPort = (short)nudComPort.Value;
// not needed for MTD but set to some valid value
axMSComm1.Settings = "9600,E,7,1";
// enable the OnComm receive
axMSComm1.RThreshold = 1;
54