1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
| Public Class Form1
Public n1 As Double
Public signe As Byte
Public tf As Byte
Private Property n2 As Object
Private Property n3 As Object
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If tf = 0 Then
TextBox.Text = TextBox.Text + Str(1)
Else
TextBox.Text = Str(1)
tf = 0
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If tf = 0 Then
TextBox.Text = TextBox.Text + Str(2)
Else
End If
TextBox.Text = Str(2)
tf = 0
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If tf = 0 Then
TextBox.Text = TextBox.Text + Str(3)
Else '
End If
TextBox.Text = Str(3)
tf = 0
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If tf = 0 Then
TextBox.Text = TextBox.Text + Str(4)
Else
End If
TextBox.Text = Str(4)
tf = 0
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
If tf = 0 Then
TextBox.Text = TextBox.Text + Str(5)
Else
End If
TextBox.Text = Str(5)
tf = 0
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
If tf = 0 Then
TextBox.Text = TextBox.Text + Str(6)
Else
End If
TextBox.Text = Str(6)
tf = 0
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
If tf = 0 Then
TextBox.Text = TextBox.Text + Str(7)
Else
End If
TextBox.Text = Str(7)
tf = 0
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
If tf = 0 Then
TextBox.Text = TextBox.Text + Str(8)
Else
End If
TextBox.Text = Str(8)
tf = 0
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
If tf = 0 Then
TextBox.Text = TextBox.Text + Str(9)
Else
End If
TextBox.Text = Str(9)
tf = 0
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
n1 = Val(Text.TEXT)
tf = 1
signe = 1
End Sub
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
n1 = Val(Text.TEXT)
tf = 1
signe = 2
End Sub
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
n1 = Val(TextBox.Text)
tf = 1
signe = 3
End Sub
Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
n1 = Val(TextBox.Text)
tf = 1
signe = 4
End Sub
Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
TextBox.Text = ""
n1 = 0
End Sub
Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
n2 = Val(TextBox.Text)
Select Case signe
Case 1
n3 = n1 / n2
Case 2
n3 = n1 * n2
Case 3
n3 = n1 + n2
Case 4
n3 = n1 - n2
End Select
TextBox.Text = Str(3)
tf = 1
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
End Class |
Partager