📄 form1.vb
字号:
Public Class Form1
Private _lab1 As Integer = 20
Private _lab2 As Integer = 14
Private _lab3 As Integer = 42
Property lab1() As Integer
Get
Return _lab1
End Get
Set(ByVal value As Integer)
If value >= 0 And value < 24 Then
_lab1 = value
End If
End Set
End Property
Property lab2() As Integer
Get
Return _lab2
End Get
Set(ByVal value As Integer)
If value >= 0 And value < 60 Then
_lab2 = value
End If
End Set
End Property
Property lab3() As Integer
Get
Return _lab3
End Get
Set(ByVal value As Integer)
If value >= 0 And value < 60 Then
_lab3 = value
End If
End Set
End Property
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = lab1
Label2.Text = lab2
Label3.Text = lab3
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
lab1 = lab1 + 1
Label1.Text = lab1
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
lab1 = lab1 - 1
Label1.Text = lab1
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
lab2 = lab2 + 1
Label2.Text = lab2
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
lab2 = lab2 - 1
Label2.Text = lab2
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
lab3 = lab3 + 1
Label3.Text = lab3
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
lab3 = lab3 - 1
Label3.Text = lab3
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Me.Close()
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Me.Close()
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -