Me.Controls.Add(Me.Button8)
Me.Controls.Add(Me.Button7)
Me.Controls.Add(Me.Button6)
Me.Controls.Add(Me.Button5)
Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Label1)
Me.Name = "SimpleCalculator"
Me.Text = "简单计算器"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub TextBox1_TabStopChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim btn As Button'按钮类型的变量
btn = sender'把产生该事件的按钮对象赋值给btn
TextBox1.Text = TextBox1.Text + btn.Text'把该按钮的Text属性值连接到TextBox1中
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim btn As Button
btn = sender
TextBox1.Text += btn.Text
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim btn As Button
btn = sender
TextBox1.Text += btn.Text
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim btn As Button
btn = sender
TextBox1.Text += btn.Text
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim btn As Button
btn = sender
TextBox1.Text += btn.Text
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Dim btn As Button
btn = sender
TextBox1.Text += btn.Text
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Dim btn As Button
btn = sender
TextBox1.Text += btn.Text
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
Dim btn As Button
btn = sender
TextBox1.Text += btn.Text
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Dim btn As Button
btn = sender
TextBox1.Text += btn.Text
End Sub
Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
Dim btn As Button
btn = sender
TextBox1.Text += btn.Text
End Sub
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
Dim btn As Button
btn = sender
'在文本框的Text属性后连接一个空格、本按钮的Text属性值和一个空格
TextBox1.Text = TextBox1.Text + " " + btn.Text + " "
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = ""'清空文本框
End Sub
Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
Dim btn As Button
btn = sender
TextBox1.Text = TextBox1.Text + " " + btn.Text + " "
End Sub
Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
Dim btn As Button
btn = sender
TextBox1.Text = TextBox1.Text + " " + btn.Text + " "
End Sub
Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
Dim btn As Button
btn = sender
TextBox1.Text = TextBox1.Text + " " + btn.Text + " "
推荐阅读
- html5如何做五角星,javascript画五角星
- 华为鸿蒙主题奶油色,华为鸿蒙主题怎么设置好看
- 拍摄视频为什么卡顿怎么办,为什么拍视频会卡顿
- 虚拟机无网络访问权限,虚拟机显示无网络访问权限
- c语言转移成go c语言转移语句
- wordpress无法修改主题,wordpress 重置主题
- 苹果角色扮演类游戏,苹果角色扮演游戏推荐
- mysql表校验,mysql_real_query
- C语言编写反正切函数 c语言求正切值