I am not sure what you are doing? I count ten buttons on the form?
I would create a simple form like this:
Three text boxes on the form. TextBox1, TextBox2 and TextBox3. Use labels for Variable1, Variable2 and Result. Place the operators on the form using radio buttons.
The code for this looks like this:
Code:
Public Class Form1
Inherits System.Windows.Forms.Form
'Declare FirstNum and SecondNum variables
Dim FirstNum, SecondNum As Double
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Assign text box values to variables
FirstNum = TextBox1.Text
SecondNum = TextBox2.Text
'Determine checked button and calculate
If RadioButton1.Checked = True Then
TextBox3.Text = FirstNum + SecondNum
End If
If RadioButton2.Checked = True Then
TextBox3.Text = FirstNum - SecondNum
End If
If RadioButton3.Checked = True Then
TextBox3.Text = FirstNum * SecondNum
End If
If RadioButton4.Checked = True Then
TextBox3.Text = FirstNum / SecondNum
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
This is pretty much right out of Chapter 5 Visual Basic.NET Step by Step by Michael Halvorson.
There should be no problem displaying a negative number and nothing is needed.
Note the Radio Buttons are placed in a Group Box! That allows only one to be checked (True) of the group.
<EDIT>
To make it simple the entire source code and form can be found here as a sample:
http://www.bearblain.com/downloads.htm
Just download the zip folder saving to a location on your machine. Right click on the zip folder and extract the contents to a convenient location. Open VB.NET and navigate to the files and open them. Hope that helps.
</EDIT>
Ron