C#.net example – MagTek 99875125 User Manual

Page 58

Advertising
background image

MagTek Device Drivers for Windows


C#.NET EXAMPLE

Active control names



Source (Form1.CS)

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace MTD_Example
{
/// <summary>
/// Example code for using the MTD Driver with C#.Net
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnOpen;
private System.Windows.Forms.TextBox txtCommand;
private System.Windows.Forms.Button btnSend;
private System.Windows.Forms.TextBox txtResponse;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.NumericUpDown nudComPort;
private AxMSCommLib.AxMSComm axMSComm1;
private System.Windows.Forms.TextBox txtOpenResults;
private System.Windows.Forms.Label lblSelComPort;
private System.Windows.Forms.Label lblCommand;
private System.Windows.Forms.Label lblResponse;
private System.Windows.Forms.Label lblOpenResults;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;

50

Advertising