我對VS 2012非常新奇,我想知道如何保存用戶輸入的內容,以便在他們重新打開程序時保存它。現在我只有兩個按鈕,每按一次它就會將標籤增加1,另一個按另一個將另一個按照百分比分開的標籤。VS Express 2012桌面如何保存用戶的輸入
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
爲我們提供了代碼 –
添加了代碼@NikolaMitev –