Переменная в нескольких процедурах - VB
Формулировка задачи:
Листинг программы
- Option Explicit
- Private g As Byte
- Private Sub Command1_Click()
- Label1.Visible = False
- Label2.Visible = True
- Command1.Visible = False
- Command2.Visible = True
- bytq = bytq + 1
- End Sub
Решение задачи: «Переменная в нескольких процедурах»
textual
Листинг программы
- Private g As Byte
- Private Sub Command1_Click()
- Label1.Visible = False
- Label2.Visible = True
- Command1.Visible = False
- Command3.Visible = True
- Command2.Visible = False
- Command4.Visible = True
- q = q + 1
- Command1.Caption = "q=" & q
- End Sub
- Private Sub Command2_Click()
- Label1.Visible = False
- Command1.Visible = False
- Command2.Visible = False
- Command3.Visible = True
- Command4.Visible = True
- Label2.Visible = True
- q = q + 1
- Command2.Caption = "q=" & q
- End Sub
- Private Sub Command19_Click()
- Command19.Visible = False
- Command20.Visible = False
- Command21.Visible = False
- Command22.Visible = False
- Label8.Visible = False
- Label9.Visible = True
- q = q + 1
- Command19.Caption = "q=" & q
- Form1.Print q
- End Sub
- Private Sub Command20_Click()
- Command19.Visible = False
- Command20.Visible = False
- Command21.Visible = False
- Command22.Visible = False
- Label8.Visible = False
- Label9.Visible = True
- q = q + 1
- Command20.Caption = "q=" & q
- Form1.Print q
- End Sub
- Private Sub Command21_Click()
- Command19.Visible = False
- Command20.Visible = False
- Command21.Visible = False
- Command22.Visible = False
- Label8.Visible = False
- Label9.Visible = True
- q = q + 1
- Command21.Caption = "q=" & q
- Form1.Print q
- End Sub
- Private Sub Command22_Click()
- Command19.Visible = False
- Command20.Visible = False
- Command21.Visible = False
- Command22.Visible = False
- Label8.Visible = False
- Label9.Visible = True
- q = q + 1
- Command22.Caption = "q=" & q
- Form1.Print q
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д