Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button4 As System.Windows.Forms.Button Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.TextBox1 = New System.Windows.Forms.TextBox Me.TextBox2 = New System.Windows.Forms.TextBox Me.Label3 = New System.Windows.Forms.Label Me.TextBox3 = New System.Windows.Forms.TextBox Me.Button1 = New System.Windows.Forms.Button Me.Button2 = New System.Windows.Forms.Button Me.Button3 = New System.Windows.Forms.Button Me.Button4 = New System.Windows.Forms.Button Me.SuspendLayout() ' 'Label1 ' Me.Label1.BackColor = System.Drawing.SystemColors.Desktop Me.Label1.Location = New System.Drawing.Point(16, 16) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(128, 32) Me.Label1.TabIndex = 0 Me.Label1.Text = "Enter First Number" ' 'Label2 ' Me.Label2.Location = New System.Drawing.Point(16, 48) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(128, 40) Me.Label2.TabIndex = 1 Me.Label2.Text = "Enter Second Number" ' 'TextBox1 ' Me.TextBox1.AcceptsTab = True Me.TextBox1.Location = New System.Drawing.Point(168, 16) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(104, 20) Me.TextBox1.TabIndex = 2 Me.TextBox1.Tag = "textbox1" Me.TextBox1.Text = "" ' 'TextBox2 ' Me.TextBox2.Location = New System.Drawing.Point(168, 48) Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New System.Drawing.Size(104, 20) Me.TextBox2.TabIndex = 3 Me.TextBox2.Tag = "textbox2" Me.TextBox2.Text = "" ' 'Label3 ' Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!) Me.Label3.Location = New System.Drawing.Point(16, 112) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(128, 64) Me.Label3.TabIndex = 4 Me.Label3.Text = "ANSWER" ' 'TextBox3 ' Me.TextBox3.Location = New System.Drawing.Point(168, 120) Me.TextBox3.Name = "TextBox3" Me.TextBox3.ReadOnly = True Me.TextBox3.Size = New System.Drawing.Size(104, 20) Me.TextBox3.TabIndex = 5 Me.TextBox3.Tag = "textbox3" Me.TextBox3.Text = "" ' 'Button1 ' Me.Button1.BackColor = System.Drawing.SystemColors.GrayText Me.Button1.Location = New System.Drawing.Point(8, 224) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(64, 32) Me.Button1.TabIndex = 6 Me.Button1.Text = "Add" ' 'Button2 ' Me.Button2.BackColor = System.Drawing.SystemColors.GrayText Me.Button2.Location = New System.Drawing.Point(80, 224) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(56, 32) Me.Button2.TabIndex = 7 Me.Button2.Text = "subtract" ' 'Button3 ' Me.Button3.BackColor = System.Drawing.SystemColors.GrayText Me.Button3.Location = New System.Drawing.Point(144, 224) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(64, 32) Me.Button3.TabIndex = 8 Me.Button3.Text = "clear" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.SystemColors.GrayText Me.Button4.Location = New System.Drawing.Point(216, 224) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(56, 32) Me.Button4.TabIndex = 9 Me.Button4.Text = "stop" ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.SystemColors.Desktop Me.ClientSize = New System.Drawing.Size(292, 273) Me.Controls.Add(Me.Button4) Me.Controls.Add(Me.Button3) Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.TextBox3) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.TextBox2) Me.Controls.Add(Me.TextBox1) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.Name = "Form1" Me.Text = "Form1" Me.ResumeLayout(False) End Sub #End Region Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox3.Text = CDbl(TextBox1.Text) + CDbl(TextBox2.Text) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox3.Text = CDbl(TextBox1.Text) - CDbl(TextBox2.Text) End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.ResetText() TextBox2.ResetText() TextBox3.ResetText() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Me.Close() End Sub End Class