Академический Документы
Профессиональный Документы
Культура Документы
General discussion
Sign in to vote
Hi ALL,
http://msdn.microsoft.com/vstudio/express/future/downloads/default.aspx
It uses;
o 1 Checkbox
o 40 Buttons !!
o 1 Textbox
o 3 RadioButtons on
o 1 Panel
o 2 Labels
I will try to put the project as a ZIP file on the internet for download, in case
anyone is interested?
Regards,
S_DS
_________________________________________________
sum = 0
End Sub
'This button has "CE" on it for CLEAR ENTRY.
Private Sub Button18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button18.Click
TextBox1.Clear()
End Sub
'This button has "\" on it for integer division.
Private Sub Button19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button19.Click
operand = "\"
If checkInput() = True Then value1 = CDbl(TextBox1.Text)
TextBox1.Clear()
End Sub
'This button has "SIN" on it.
Private Sub Button20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button20.Click
If String.IsNullOrEmpty(TextBox1.Text) = True Then
Exit Sub
Else
operand = "SIN"
value1 = CDbl(TextBox1.Text)
If CheckBox1.Checked = False Then
TextBox1.Text = Math.Sin(value1 / conversionFactor)
Else
CheckBox1.Checked = False
TextBox1.Text = Math.Asin(value1) * conversionFactor
End If
End If
End Sub
'This button has "COS" on it.
Private Sub Button21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button21.Click
If String.IsNullOrEmpty(TextBox1.Text) = True Then
Exit Sub
Else
operand = "COS"
value1 = CDbl(TextBox1.Text)
If CheckBox1.Checked = False Then
TextBox1.Text = Math.Cos(value1 / conversionFactor)
Else
CheckBox1.Checked = False
TextBox1.Text = Math.Acos(value1) * conversionFactor
End If
End If
End Sub
'This button has "TAN" on it.
Private Sub Button22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button22.Click
If String.IsNullOrEmpty(TextBox1.Text) = True Then
Exit Sub
Else
operand = "TAN"
value1 = CDbl(TextBox1.Text)
Return False
End If
End Function
'This button has "MS" on it for "MEMORY STORE".
Private Sub Button25_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button25.Click
If checkInput() = True Then memory = CDbl(TextBox1.Text)
If memory <> 0 Then
Label1.Text = "M"
Else
Label1.Text = Nothing
End If
End Sub
'This button has "MC" on it for "MEMORY CANCEL"
Private Sub Button26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button26.Click
memory = 0
Label1.Text = Nothing
End Sub
'This button has "M+" on it for "MEMORY PLUS"
'Adds the value in the textbox to the memory value.
Private Sub Button27_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button27.Click
If String.IsNullOrEmpty(TextBox1.Text) Then
Exit Sub
Else
memory += CDbl(TextBox1.Text)
Label1.Text = "M"
TextBox1.Text = CStr(memory)
Else
Label1.Text = Nothing
End If
End Sub
'This button has "Sqrt" on it to calculate the square root.
Private Sub Button33_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button33.Click
If String.IsNullOrEmpty(TextBox1.Text) Then
Exit Sub
Else
If checkInput() = True Then TextBox1.Text = Math.Sqrt(CDbl(TextBox1.Text))
End If
End Sub
'This button has "+ / -" on it to change the sign of the number.
Private Sub Button34_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button34.Click
If String.IsNullOrEmpty(TextBox1.Text) Then
Exit Sub
Else
If checkInput() = True Then TextBox1.Text = ((CDbl(TextBox1.Text)) * -1).ToString
End If
End Sub
'This button has "LOG10" on it to return the
'LOG of a number to base 10.