public Form1() { InitializeComponent(); // Stuff for the hardware button message handling this.messageWindow = new myMessageWindow(this); RegisterHKeys.RegisterRecordKey(this.messageWindow.Hwnd); // set up timer LongTimer = new Timer(); LongTimer.Tick += new EventHandler(BaseTime); ShortTimer = new Timer(); ShortTimer.Tick += new EventHandler(TakeSample); // set up random number generator RandNum = new Random(); // display default values into the text boxes txtUB.Text = UpperBound.ToString(); txtLB.Text = LowerBound.ToString(); txtDisplacement.Text = Displacement.ToString(); // set default type to base + displacement cboMonitorType.SelectedIndex = 0; // instantiate measurement class M = new Measurement(); }