我对 VS 2012 非常陌生,我想知道如何保存用户输入的内容,以便在他们重新打开程序时它就在那里。现在我只有 2 个按钮,每次按下它们时标签会增加 1,而另一个标签则将一个标签除以百分比。
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim k, d, r As Single
k = Label2.Text + 1
d = Label4.Text
r = (d / k)
Label2.Text = k
Label6.Text = Format(r, "Percent")
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim k, d, r As Single
k = Label2.Text
d = Label4.Text + 1
r = (d / k)
Label4.Text = d
Label6.Text = Format(r, "Percent")
End Sub