���� ���� ������ ������� ���� 6 �� ����� ������� ���� ������� ��� ����
��� ��� ������ ������� ����� |
���� ����� ������ ���� ������� ���� ����� ����� ���� ������ � ���� ��� �������� ������� � ������� |
�� ���� ����� ���� � ���� ��� ������� ����� ��� ��� ��� ������ �� ����� ����:
�� ������ ������� ����� ������ ������ :
�� ������ ������� ������ (���� ���� ���� ) � �� ������ ����� Enabled ������� ��� False
��� ����� �������� ����� ��� ���� ����� :
���� ��� �� ���� �� �����
����� ����� �� General :
��� ����� ��� ���� ������ ����� ������� ����� �� ������� �������� ������ ��� ������ ������� � �� ���� ����� ������� ����� � ���� ����� �� ���� ��� ��������� ������ �� ����� ��������� ���� �� ������ �� General ���� ���� ����� � �� ���� General �� �� ��� ��� ���� ���� ������ ��� ������ �� ���� ����� ���� Private Sub Form_Load() � ���� ������ ������� �����:
Dim a1, a2, a3, a4, a5, a6, a7, a8 As Integer |
��� ����� ���� ���� ������ ������ ������� �� ����� ������ ����� ��������� �� a1, a2, a3, a4, a5, a6, a7, a8
����� ������ �� �� ���� ���� :
��� ����� ���� ���� ���� 8 ����� ������� ����� � ������ �� ������� � �� ������ �� ������ ������� ������ ����� �� ���� ���� :
Private Sub Command10_Click() |
���������������� |
���������������������������������������������� |
Randomize | ��� ���� ��� ����� ����� �������� |
Command1.Enabled = True | ������ ����� ���� |
Command2.Enabled = True | ������ ����� ���� |
Command3.Enabled = True | ������ ����� ���� |
Command4.Enabled = True | ������ ����� ���� |
Command5.Enabled = True | ������ ����� ���� |
Command6.Enabled = True | ������ ����� ���� |
Command7.Enabled = True | ������ ����� ���� |
Command8.Enabled = True | ������ ����� ���� |
Command9.Enabled = True | ������ ����� ���� |
a1 = Int(Rnd * 101) |
������� ����� ��� ������ ���� ��� �� 101 |
a2 = Int(Rnd * 101) |
������� ����� ��� ������ ���� ��� �� 101 |
a3 = Int(Rnd * 101) | ������� ����� ��� ������ ���� ��� �� 101 |
a4 = Int(Rnd * 101) | ������� ����� ��� ������ ���� ��� �� 101 |
a5 = Int(Rnd * 101) | ������� ����� ��� ������ ���� ��� �� 101 |
a6 = Int(Rnd * 101) | ������� ����� ��� ������ ���� ��� �� 101 |
a7 = Int(Rnd * 101) | ������� ����� ��� ������ ���� ��� �� 101 |
a8 = Int(Rnd * 101) | ������� ����� ��� ������ ���� ��� �� 101 |
Command1.Caption = a1 | ������� ����� ���� ����� � ��� ����� ���� ������� ����� a1 |
Command2.Caption = a2 | ������� ����� ���� ������ � ��� ����� ���� ������� ����� a2 |
Command3.Caption = a3 | ������� ����� ���� ������ � ��� ����� ���� ������� ����� a3 |
Command4.Caption = a4 | ������� ����� ���� ������ � ��� ����� ���� ������� ����� a4 |
Command5.Caption = a5 | ������� ����� ���� ������ � ��� ����� ���� ������� ����� a5 |
Command6.Caption = a6 | ������� ����� ���� ������ � ��� ����� ���� ������� ����� a6 |
Command7.Caption = a7 | ������� ����� ���� ������ � ��� ����� ���� ������� ����� a7 |
Command8.Caption = a8 | ������� ����� ���� ������ � ��� ����� ���� ������� ����� a8 |
����� ������ �� ���� Command1 :
���� ���� ������ ��� ���� Command1 � ���� �� ��� :
Private Sub Command1_Click() |
���������������� |
���������������������������������������������� |
If a1 Mod 2 = 0 Then |
��� ��� ���� ���� ���� ������� a1 ��� 2 ����� 0 ��� . |
Label4 = Val(Label4.Caption) + 1 | ��� ����� ��� ������ ��� ���� ����� ������ � �� ���� ���� ����� ����� �� ���� 1��� ������ �������� �� ������ ������ ������ ���� �������� ������� . |
Else | ������ � ��� � ���� ��� �� ��� ��� ����� ����� ���� ����� ���� ��� . |
Label3 = Val(Label3.Caption) + 1 | ��� ����� ��� ������ ��� �� ���� ����� ������ � �� ���� ���� ����� ����� �� ���� 1 ��� ������ �������� �� ������ ������ ������ ���� �������� ������� . |
End If | ���� ������� ������ ���� ����� ������ ����� ���� ����� |
Command1.Enabled = False | ������ ����� ���� ��� ���� . |
��� ����� ������ �� ������� ������� ����� ������ ������ :
Private Sub Command2_Click()
|
����� ������ �� ���� Command9 ������� ���� �� ���� ����� :
���� ���� ������ ��� ���� Command9 � ���� �� ��� :
Private Sub Command9_Click() |
� ��� ��� �����
������ |
������ |
����� ����� ���� a �� ����� ������ ������ ����� ��� �������� ������� �� ������� ���� �� ������ �������� ���� ����. |
Dim a As Integer |
��� ���� ����� ��� ��� ����Command1 ���� ���� ����� ��� ��� ���� ���� ������� a1 ������ ��� 2 ����� ��� ���� ���� ���� ������� a ����� 1 |
If Command1.Enabled = True Then If a1 Mod 2 = 0 Then a = 1 End If |
��� ���� ����� ��� ��� ����Command2 ���� ���� ����� ��� ��� ���� ���� ������� a2 ������ ��� 2 ����� ��� ���� ���� ���� ������� a ����� ����� ���� ������� a ������� � ���� ����� 1 |
If Command2.Enabled = True Then If a2 Mod 2 = 0 Then a = a + 1 End If |
��� ���� ����� ��� ��� ����Command3 ���� ���� ����� ��� ��� ���� ���� ������� a3 ������ ��� 2 ����� ��� ���� ���� ���� ������� a ����� ����� ���� ������� a ������� � ���� ����� 1 |
If Command3.Enabled = True Then If a3 Mod 2 = 0 Then a = a + 1 End If |
��� ���� ����� ��� ��� ����Command4 ���� ���� ����� ��� ��� ���� ���� ������� a4 ������ ��� 2 ����� ��� ���� ���� ���� ������� a ����� ����� ���� ������� a ������� � ���� ����� 1 |
If Command4.Enabled = True Then If a4 Mod 2 = 0 Then a = a + 1 End If |
��� ���� ����� ��� ��� ����Command5 ���� ���� ����� ��� ��� ���� ���� ������� a5 ������ ��� 2 ����� ��� ���� ���� ���� ������� a ����� ����� ���� ������� a ������� � ���� ����� 1 |
If Command5.Enabled = True Then If a5 Mod 2 = 0 Then a = a + 1 End If |
��� ���� ����� ��� ��� ����Command6 ���� ���� ����� ��� ��� ���� ���� ������� a6 ������ ��� 2 ����� ��� ���� ���� ���� ������� a ����� ����� ���� ������� a ������� � ���� ����� 1 |
If Command6.Enabled = True Then If a6 Mod 2 = 0 Then a = a + 1 End If |
��� ���� ����� ��� ��� ����Command7 ���� ���� ����� ��� ��� ���� ���� ������� a7 ������ ��� 2 ����� ��� ���� ���� ���� ������� a ����� ����� ���� ������� a ������� � ���� ����� 1 |
If Command7.Enabled = True Then If a7 Mod 2 = 0 Then a = a + 1 End If |
��� ���� ����� ��� ��� ����Command8 ���� ���� ����� ��� ��� ���� ���� ������� a8 ������ ��� 2 ����� ��� ���� ���� ���� ������� a ����� ����� ���� ������� a ������� � ���� ����� 1 |
If Command8.Enabled = True Then If a8 Mod 2 = 0 Then a = a + 1 End If |
��� ���� ����� ��� ������� a ���� �� 0 �� ��� ��� �� �� ������ ��������. | If a > 0 Then |
���� ��� ����� ����� ���� � ���� ��� ���� � ���� vbOKOnly ������� ��� �� OK � ������ ����� �������� �� ����� ������� . | showmsg = MsgBox("����� ����� ���� � ���� ��� ����", vbOKOnly, "����� ��������") |
��� ���� Label3 ����� �� ���� ���� Label3 ������� ��� ��� � ���� ���� 1 . �� ���� ����� ����� | Label3 = Val(Label3.Caption) + 1 |
����� ��� �� ����� ����� ������ � �� a > 0 ���� ����� ���� ������ ���� ��� Else . | Else |
��� ���� Label4 ����� �� ���� ���� Label4 ������� ��� ��� � ���� ���� 1 .�� ���� ����� ����� . | Label4 = Val(Label4.Caption) + 1 |
���� ����� ���� ����� �� �� ���� �� ���� ���� �������� � ������ ����� ������� |
Command1.Enabled = False Command2.Enabled = False Command3.Enabled = False Command4.Enabled = False Command5.Enabled = False Command6.Enabled = False Command7.Enabled = False Command8.Enabled = False Command9.Enabled = False |
���� �� ���� ���� | Command10.Enabled = True |
��� ��� ����� ��� ���� �� ���� ������� � ���� vbOKOnly ������� ��� �� OK � ������ ����� �������� �� ����� ������� . | showmsg = MsgBox("����� ��� ���� �� ���� �������", vbOKOnly, "����� ��������") |
���� ���� ����� � �� ������� ��� ����� ������ | End If |
���� ����� �������� � ����� ��� ������ ����� ���� .
������� ���� : ����� �������� ������ �� ������ ���� ���� � ����� ��� ������ ����
���� ����� ������ ������ ���������@2006 |