成功了Public Class Form1
Dim strmiddle() As String = {"0", "0", "0"}
Dim calmethod1 As String = "0"
Dim calmethod2 As String = "0"
Dim strdot As Boolean = False
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If strmiddle(0) = 0 Then
TextBox1.Text = strmiddle(0) & "."
ElseIf strdot = False Then
strmiddle(0) = strmiddle(0) & "."
Else
strmiddle(0) = strmiddle(0) & "0"
TextBox1.Text = strmiddle(0)
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
strmiddle(0) = "0"
strmiddle(1) = "0"
strmiddle(2) = "0"
calmethod1 = "0"
calmethod2 = "0"
strdot = False
TextBox1.Text = "0."
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
strdot = True
strmiddle(0) = strmiddle(0) & "."
TextBox1.Text = strmiddle(0)
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
If strmiddle(2) = "0" Then
Select Case calmethod1
Case "+"
TextBox1.Text = Str(Val(strmiddle(1)) + Val(strmiddle(0)))
Case "-"
Dim strmiddle() As String = {"0", "0", "0"}
Dim calmethod1 As String = "0"
Dim calmethod2 As String = "0"
Dim strdot As Boolean = False
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If strmiddle(0) = 0 Then
TextBox1.Text = strmiddle(0) & "."
ElseIf strdot = False Then
strmiddle(0) = strmiddle(0) & "."
Else
strmiddle(0) = strmiddle(0) & "0"
TextBox1.Text = strmiddle(0)
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
strmiddle(0) = "0"
strmiddle(1) = "0"
strmiddle(2) = "0"
calmethod1 = "0"
calmethod2 = "0"
strdot = False
TextBox1.Text = "0."
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
strdot = True
strmiddle(0) = strmiddle(0) & "."
TextBox1.Text = strmiddle(0)
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
If strmiddle(2) = "0" Then
Select Case calmethod1
Case "+"
TextBox1.Text = Str(Val(strmiddle(1)) + Val(strmiddle(0)))
Case "-"