19.3. Код и запуск программы


Открываем файл Form1.vb (например, по схеме: File, Open, File) и в классе Form1 записываем следующие переменные и методы.

Листинг 19.1. Переменные и методы.

'Массив для загадываемого слова из 20 (и менее) букв

'с индексами 0,1,2,3,…,19:

Dim str(19) As String

Dim nums As Integer

На первой форме Form1 в режиме проектирования дважды щёлкаем по кнопке Button с именем для первой буквы используемого в данной игре английского алфавита Name = A (или в панели Properties для этого элемента на вкладке Events дважды щёлкаем по имени соответствующего события).

Появившийся шаблон метода после записи нашего кода принимает следующий вид.

Листинг 19.2. Метод-обработчик щелчка кнопки.

Private Sub A_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles A.Click

A.Enabled = False

nums = Len(Word_in.Text)

Try

str(0) = Mid(Word_in.Text, nums, 1)

str(1) = Mid(Word_in.Text, nums – 1, 1)

str(2) = Mid(Word_in.Text, nums – 2, 1)

str(3) = Mid(Word_in.Text, nums – 3, 1)

str(4) = Mid(Word_in.Text, nums – 4, 1)

str(5) = Mid(Word_in.Text, nums – 5, 1)

str(6) = Mid(Word_in.Text, nums – 6, 1)

str(7) = Mid(Word_in.Text, nums – 7, 1)

str(8) = Mid(Word_in.Text, nums – 8, 1)

str(9) = Mid(Word_in.Text, nums – 9, 1)

str(10) = Mid(Word_in.Text, nums – 10, 1)

str(11) = Mid(Word_in.Text, nums – 11, 1)

str(12) = Mid(Word_in.Text, nums – 12, 1)

str(13) = Mid(Word_in.Text, nums – 13, 1)

str(14) = Mid(Word_in.Text, nums – 14, 1)

str(15) = Mid(Word_in.Text, nums – 15, 1)

str(16) = Mid(Word_in.Text, nums – 16, 1)

str(17) = Mid(Word_in.Text, nums – 17, 1)

str(18) = Mid(Word_in.Text, nums – 18, 1)

str(19) = Mid(Word_in.Text, nums – 19, 1)

Catch ex As Exception

End Try

If Word_in.TextLength = 1 Then

If str(0) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 2 Then

If str(1) = "a" Then

Chr1.Text = "A"

End If

If str(0) = "a" Then

Chr2.Text = "A"

End If

ElseIf Word_in.TextLength = 3 Then

If str(0) = "a" Then

Chr3.Text = "A"

End If

If str(1) = "a" Then

Chr2.Text = "A"

End If

If str(2) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 4 Then

If str(0) = "a" Then

Chr4.Text = "A"

End If

If str(1) = "a" Then

Chr3.Text = "A"

End If

If str(2) = "a" Then

Chr2.Text = "A"

End If

If str(3) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 5 Then

If str(0) = "a" Then

Chr5.Text = "A"

End If

If str(1) = "a" Then

Chr4.Text = "A"

End If

If str(2) = "a" Then

Chr3.Text = "A"

End If

If str(3) = "a" Then

Chr2.Text = "A"

End If

If str(4) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 6 Then

If str(0) = "a" Then

Chr6.Text = "A"

End If

If str(1) = "a" Then

Chr5.Text = "A"

End If

If str(2) = "a" Then

Chr4.Text = "A"

End If

If str(3) = "a" Then

Chr3.Text = "A"

End If

If str(4) = "a" Then

Chr2.Text = "A"

End If

If str(5) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 7 Then

If str(0) = "a" Then

Chr7.Text = "A"

End If

If str(1) = "a" Then

Chr6.Text = "A"

End If

If str(2) = "a" Then

Chr5.Text = "A"

End If

If str(3) = "a" Then

Chr4.Text = "A"

End If

If str(4) = "a" Then

Chr3.Text = "A"

End If

If str(5) = "a" Then

Chr2.Text = "A"

End If

If str(6) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 8 Then

If str(0) = "a" Then

Chr8.Text = "A"

End If

If str(1) = "a" Then

Chr7.Text = "A"

End If

If str(2) = "a" Then

Chr6.Text = "A"

End If

If str(3) = "a" Then

Chr5.Text = "A"

End If

If str(4) = "a" Then

Chr4.Text = "A"

End If

If str(5) = "a" Then

Chr3.Text = "A"

End If

If str(6) = "a" Then

Chr2.Text = "A"

End If

If str(7) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 9 Then

If str(0) = "a" Then

Chr9.Text = "A"

End If

If str(1) = "a" Then

Chr8.Text = "A"

End If

If str(2) = "a" Then

Chr7.Text = "A"

End If

If str(3) = "a" Then

Chr6.Text = "A"

End If

If str(4) = "a" Then

Chr5.Text = "A"

End If

If str(5) = "a" Then

Chr4.Text = "A"

End If

If str(6) = "a" Then

Chr3.Text = "A"

End If

If str(7) = "a" Then

Chr2.Text = "A"

End If

If str(8) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 10 Then

If str(0) = "a" Then

Chr10.Text = "A"

End If

If str(1) = "a" Then

Chr9.Text = "A"

End If

If str(2) = "a" Then

Chr8.Text = "A"

End If

If str(3) = "a" Then

Chr7.Text = "A"

End If

If str(4) = "a" Then

Chr6.Text = "A"

End If

If str(5) = "a" Then

Chr5.Text = "A"

End If

If str(6) = "a" Then

Chr4.Text = "A"

End If

If str(7) = "a" Then

Chr3.Text = "A"

End If

If str(8) = "a" Then

Chr2.Text = "A"

End If

If str(9) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 11 Then

If str(0) = "a" Then

Chr11.Text = "A"

End If

If str(1) = "a" Then

Chr10.Text = "A"

End If

If str(2) = "a" Then

Chr9.Text = "A"

End If

If str(3) = "a" Then

Chr8.Text = "A"

End If

If str(4) = "a" Then

Chr7.Text = "A"

End If

If str(5) = "a" Then

Chr6.Text = "A"

End If

If str(6) = "a" Then

Chr5.Text = "A"

End If

If str(7) = "a" Then

Chr4.Text = "A"

End If

If str(8) = "a" Then

Chr3.Text = "A"

End If

If str(9) = "a" Then

Chr2.Text = "A"

End If

If str(10) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 12 Then

If str(0) = "a" Then

Chr12.Text = "A"

End If

If str(1) = "a" Then

Chr11.Text = "A"

End If

If str(2) = "a" Then

Chr10.Text = "A"

End If

If str(3) = "a" Then

Chr9.Text = "A"

End If

If str(4) = "a" Then

Chr8.Text = "A"

End If

If str(5) = "a" Then

Chr7.Text = "A"

End If

If str(6) = "a" Then

Chr6.Text = "A"

End If

If str(7) = "a" Then

Chr5.Text = "A"

End If

If str(8) = "a" Then

Chr4.Text = "A"

End If

If str(9) = "a" Then

Chr3.Text = "A"

End If

If str(10) = "a" Then

Chr2.Text = "A"

End If

If str(11) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 13 Then

If str(0) = "a" Then

Chr13.Text = "A"

End If

If str(1) = "a" Then

Chr12.Text = "A"

End If

If str(2) = "a" Then

Chr11.Text = "A"

End If

If str(3) = "a" Then

Chr10.Text = "A"

End If

If str(4) = "a" Then

Chr9.Text = "A"

End If

If str(5) = "a" Then

Chr8.Text = "A"

End If

If str(6) = "a" Then

Chr7.Text = "A"

End If

If str(7) = "a" Then

Chr6.Text = "A"

End If

If str(8) = "a" Then

Chr5.Text = "A"

End If

If str(9) = "a" Then

Chr4.Text = "A"

End If

If str(10) = "a" Then

Chr3.Text = "A"

End If

If str(11) = "a" Then

Chr2.Text = "A"

End If

If str(12) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 14 Then

If str(0) = "a" Then

Chr14.Text = "A"

End If

If str(1) = "a" Then

Chr13.Text = "A"

End If

If str(2) = "a" Then

Chr12.Text = "A"

End If

If str(3) = "a" Then

Chr11.Text = "A"

End If

If str(4) = "a" Then

Chr10.Text = "A"

End If

If str(5) = "a" Then

Chr9.Text = "A"

End If

If str(6) = "a" Then

Chr8.Text = "A"

End If

If str(7) = "a" Then

Chr7.Text = "A"

End If

If str(8) = "a" Then

Chr6.Text = "A"

End If

If str(9) = "a" Then

Chr5.Text = "A"

End If

If str(10) = "a" Then

Chr4.Text = "A"

End If

If str(11) = "a" Then

Chr3.Text = "A"

End If

If str(12) = "a" Then

Chr2.Text = "A"

End If

If str(13) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 15 Then

If str(0) = "a" Then

Chr15.Text = "A"

End If

If str(1) = "a" Then

Chr14.Text = "A"

End If

If str(2) = "a" Then

Chr13.Text = "A"

End If

If str(3) = "a" Then

Chr12.Text = "A"

End If

If str(4) = "a" Then

Chr11.Text = "A"

End If

If str(5) = "a" Then

Chr10.Text = "A"

End If

If str(6) = "a" Then

Chr9.Text = "A"

End If

If str(7) = "a" Then

Chr8.Text = "A"

End If

If str(8) = "a" Then

Chr7.Text = "A"

End If

If str(9) = "a" Then

Chr6.Text = "A"

End If

If str(10) = "a" Then

Chr5.Text = "A"

End If

If str(11) = "a" Then

Chr4.Text = "A"

End If

If str(12) = "a" Then

Chr3.Text = "A"

End If

If str(13) = "a" Then

Chr2.Text = "A"

End If

If str(14) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 16 Then

If str(0) = "a" Then

Chr16.Text = "A"

End If

If str(1) = "a" Then

Chr15.Text = "A"

End If

If str(2) = "a" Then

Chr14.Text = "A"

End If

If str(3) = "a" Then

Chr13.Text = "A"

End If

If str(4) = "a" Then

Chr12.Text = "A"

End If

If str(5) = "a" Then

Chr11.Text = "A"

End If

If str(6) = "a" Then

Chr10.Text = "A"

End If

If str(7) = "a" Then

Chr9.Text = "A"

End If

If str(8) = "a" Then

Chr8.Text = "A"

End If

If str(9) = "a" Then

Chr7.Text = "A"

End If

If str(10) = "a" Then

Chr6.Text = "A"

End If

If str(11) = "a" Then

Chr5.Text = "A"

End If

If str(12) = "a" Then

Chr4.Text = "A"

End If

If str(13) = "a" Then

Chr3.Text = "A"

End If

If str(14) = "a" Then

Chr2.Text = "A"

End If

If str(15) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 17 Then

If str(0) = "a" Then

Chr17.Text = "A"

End If

If str(1) = "a" Then

Chr16.Text = "A"

End If

If str(2) = "a" Then

Chr15.Text = "A"

End If

If str(3) = "a" Then

Chr14.Text = "A"

End If

If str(4) = "a" Then

Chr13.Text = "A"

End If

If str(5) = "a" Then

Chr12.Text = "A"

End If

If str(6) = "a" Then

Chr11.Text = "A"

End If

If str(7) = "a" Then

Chr10.Text = "A"

End If

If str(8) = "a" Then

Chr9.Text = "A"

End If

If str(9) = "a" Then

Chr8.Text = "A"

End If

If str(10) = "a" Then

Chr7.Text = "A"

End If

If str(11) = "a" Then

Chr6.Text = "A"

End If

If str(12) = "a" Then

Chr5.Text = "A"

End If

If str(13) = "a" Then

Chr4.Text = "A"

End If

If str(14) = "a" Then

Chr3.Text = "A"

End If

If str(15) = "a" Then

Chr2.Text = "A"

End If

If str(16) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 18 Then

If str(0) = "a" Then

Chr18.Text = "A"

End If

If str(1) = "a" Then

Chr17.Text = "A"

End If

If str(2) = "a" Then

Chr16.Text = "A"

End If

If str(3) = "a" Then

Chr15.Text = "A"

End If

If str(4) = "a" Then

Chr14.Text = "A"

End If

If str(5) = "a" Then

Chr13.Text = "A"

End If

If str(6) = "a" Then

Chr12.Text = "A"

End If

If str(7) = "a" Then

Chr11.Text = "A"

End If

If str(8) = "a" Then

Chr10.Text = "A"

End If

If str(9) = "a" Then

Chr9.Text = "A"

End If

If str(10) = "a" Then

Chr8.Text = "A"

End If

If str(11) = "a" Then

Chr7.Text = "A"

End If

If str(12) = "a" Then

Chr6.Text = "A"

End If

If str(13) = "a" Then

Chr5.Text = "A"

End If

If str(14) = "a" Then

Chr4.Text = "A"

End If

If str(15) = "a" Then

Chr3.Text = "A"

End If

If str(16) = "a" Then

Chr2.Text = "A"

End If

If str(17) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 19 Then

If str(0) = "a" Then

Chr19.Text = "A"

End If

If str(1) = "a" Then

Chr18.Text = "A"

End If

If str(2) = "a" Then

Chr17.Text = "A"

End If

If str(3) = "a" Then

Chr16.Text = "A"

End If

If str(4) = "a" Then

Chr15.Text = "A"

End If

If str(5) = "a" Then

Chr14.Text = "A"

End If

If str(6) = "a" Then

Chr13.Text = "A"

End If

If str(7) = "a" Then

Chr12.Text = "A"

End If

If str(8) = "a" Then

Chr11.Text = "A"

End If

If str(9) = "a" Then

Chr10.Text = "A"

End If

If str(10) = "a" Then

Chr9.Text = "A"

End If

If str(11) = "a" Then

Chr8.Text = "A"

End If

If str(12) = "a" Then

Chr7.Text = "A"

End If

If str(13) = "a" Then

Chr6.Text = "A"

End If

If str(14) = "a" Then

Chr5.Text = "A"

End If

If str(15) = "a" Then

Chr4.Text = "A"

End If

If str(16) = "a" Then

Chr3.Text = "A"

End If

If str(17) = "a" Then

Chr2.Text = "A"

End If

If str(18) = "a" Then

Chr1.Text = "A"

End If

ElseIf Word_in.TextLength = 20 Then

If str(0) = "a" Then

Chr20.Text = "A"

End If

If str(1) = "a" Then

Chr19.Text = "A"

End If

If str(2) = "a" Then

Chr18.Text = "A"

End If

If str(3) = "a" Then

Chr17.Text = "A"

End If

If str(4) = "a" Then

Chr16.Text = "A"

End If

If str(5) = "a" Then

Chr15.Text = "A"

End If

If str(6) = "a" Then

Chr14.Text = "A"

End If

If str(7) = "a" Then

Chr13.Text = "A"

End If

If str(8) = "a" Then

Chr12.Text = "A"

End If

If str(9) = "a" Then

Chr11.Text = "A"

End If

If str(10) = "a" Then

Chr10.Text = "A"

End If

If str(11) = "a" Then

Chr9.Text = "A"

End If

If str(12) = "a" Then

Chr8.Text = "A"

End If

If str(13) = "a" Then

Chr7.Text = "A"

End If

If str(14) = "a" Then

Chr6.Text = "A"

End If

If str(15) = "a" Then

Chr5.Text = "A"

End If

If str(16) = "a" Then

Chr4.Text = "A"

End If

If str(17) = "a" Then

Chr3.Text = "A"

End If

If str(18) = "a" Then

Chr2.Text = "A"

End If

If str(19) = "a" Then

Chr1.Text = "A"

End If

End If

If InStr(Word_in.Text, "a", CompareMethod.Text) = 0 Then

If f_chr1.Text = "" Then

f_chr1.Text = "A"

ElseIf f_chr2.Text = "" Then

f_chr2.Text = "A"

ElseIf f_chr3.Text = "" Then

f_chr3.Text = "A"

ElseIf f_chr4.Text = "" Then

f_chr4.Text = "A"

ElseIf f_chr5.Text = "" Then

f_chr5.Text = "A"

ElseIf f_chr6.Text = "" Then

f_chr6.Text = "A"

ElseIf f_chr7.Text = "" Then

f_chr7.Text = "A"

ElseIf f_chr8.Text = "" Then

f_chr8.Text = "A"

ElseIf f_chr9.Text = "" Then

f_chr9.Text = "A"

ElseIf f_chr10.Text = "" Then

f_chr10.Text = "A"

ElseIf f_chr11.Text = "" Then

f_chr11.Text = "A"

End If

End If

End Sub

Дважды щёлкаем по кнопке Button с именем для 2-й буквы алфавита Name = B. Появившийся шаблон метода после записи нашего кода принимает следующий вид.

Листинг 19.3. Метод-обработчик щелчка кнопки.

Private Sub B_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles B.Click

B.Enabled = False

nums = Len(Word_in.Text)

Try

str(0) = Mid(Word_in.Text, nums, 1)

str(1) = Mid(Word_in.Text, nums – 1, 1)

str(2) = Mid(Word_in.Text, nums – 2, 1)

str(3) = Mid(Word_in.Text, nums – 3, 1)

str(4) = Mid(Word_in.Text, nums – 4, 1)

str(5) = Mid(Word_in.Text, nums – 5, 1)

str(6) = Mid(Word_in.Text, nums – 6, 1)

str(7) = Mid(Word_in.Text, nums – 7, 1)

str(8) = Mid(Word_in.Text, nums – 8, 1)

str(9) = Mid(Word_in.Text, nums – 9, 1)

str(10) = Mid(Word_in.Text, nums – 10, 1)

str(11) = Mid(Word_in.Text, nums – 11, 1)

str(12) = Mid(Word_in.Text, nums – 12, 1)

str(13) = Mid(Word_in.Text, nums – 13, 1)

str(14) = Mid(Word_in.Text, nums – 14, 1)

str(15) = Mid(Word_in.Text, nums – 15, 1)

str(16) = Mid(Word_in.Text, nums – 16, 1)

str(17) = Mid(Word_in.Text, nums – 17, 1)

str(18) = Mid(Word_in.Text, nums – 18, 1)

str(19) = Mid(Word_in.Text, nums – 19, 1)

Catch ex As Exception

End Try

If Word_in.TextLength = 1 Then

If str(0) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 2 Then

If str(1) = "b" Then

Chr1.Text = "B"

End If

If str(0) = "b" Then

Chr2.Text = "B"

End If

ElseIf Word_in.TextLength = 3 Then

If str(0) = "b" Then

Chr3.Text = "B"

End If

If str(1) = "b" Then

Chr2.Text = "B"

End If

If str(2) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 4 Then

If str(0) = "b" Then

Chr4.Text = "B"

End If

If str(1) = "b" Then

Chr3.Text = "B"

End If

If str(2) = "b" Then

Chr2.Text = "B"

End If

If str(3) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 5 Then

If str(0) = "b" Then

Chr5.Text = "B"

End If

If str(1) = "b" Then

Chr4.Text = "B"

End If

If str(2) = "b" Then

Chr3.Text = "B"

End If

If str(3) = "b" Then

Chr2.Text = "B"

End If

If str(4) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 6 Then

If str(0) = "b" Then

Chr6.Text = "B"

End If

If str(1) = "b" Then

Chr5.Text = "B"

End If

If str(2) = "b" Then

Chr4.Text = "B"

End If

If str(3) = "b" Then

Chr3.Text = "B"

End If

If str(4) = "b" Then

Chr2.Text = "B"

End If

If str(5) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 7 Then

If str(0) = "b" Then

Chr7.Text = "B"

End If

If str(1) = "b" Then

Chr6.Text = "B"

End If

If str(2) = "b" Then

Chr5.Text = "B"

End If

If str(3) = "b" Then

Chr4.Text = "B"

End If

If str(4) = "b" Then

Chr3.Text = "B"

End If

If str(5) = "b" Then

Chr2.Text = "B"

End If

If str(6) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 8 Then

If str(0) = "b" Then

Chr8.Text = "B"

End If

If str(1) = "b" Then

Chr7.Text = "B"

End If

If str(2) = "b" Then

Chr6.Text = "B"

End If

If str(3) = "b" Then

Chr5.Text = "B"

End If

If str(4) = "b" Then

Chr4.Text = "B"

End If

If str(5) = "b" Then

Chr3.Text = "B"

End If

If str(6) = "b" Then

Chr2.Text = "B"

End If

If str(7) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 9 Then

If str(0) = "b" Then

Chr9.Text = "B"

End If

If str(1) = "b" Then

Chr8.Text = "B"

End If

If str(2) = "b" Then

Chr7.Text = "B"

End If

If str(3) = "b" Then

Chr6.Text = "B"

End If

If str(4) = "b" Then

Chr5.Text = "B"

End If

If str(5) = "b" Then

Chr4.Text = "B"

End If

If str(6) = "b" Then

Chr3.Text = "B"

End If

If str(7) = "b" Then

Chr2.Text = "B"

End If

If str(8) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 10 Then

If str(0) = "b" Then

Chr10.Text = "B"

End If

If str(1) = "b" Then

Chr9.Text = "B"

End If

If str(2) = "b" Then

Chr8.Text = "B"

End If

If str(3) = "b" Then

Chr7.Text = "B"

End If

If str(4) = "b" Then

Chr6.Text = "B"

End If

If str(5) = "b" Then

Chr5.Text = "B"

End If

If str(6) = "b" Then

Chr4.Text = "B"

End If

If str(7) = "b" Then

Chr3.Text = "B"

End If

If str(8) = "b" Then

Chr2.Text = "B"

End If

If str(9) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 11 Then

If str(0) = "b" Then

Chr11.Text = "B"

End If

If str(1) = "b" Then

Chr10.Text = "B"

End If

If str(2) = "b" Then

Chr9.Text = "B"

End If

If str(3) = "b" Then

Chr8.Text = "B"

End If

If str(4) = "b" Then

Chr7.Text = "B"

End If

If str(5) = "b" Then

Chr6.Text = "B"

End If

If str(6) = "b" Then

Chr5.Text = "B"

End If

If str(7) = "b" Then

Chr4.Text = "B"

End If

If str(8) = "b" Then

Chr3.Text = "B"

End If

If str(9) = "b" Then

Chr2.Text = "B"

End If

If str(10) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 12 Then

If str(0) = "b" Then

Chr12.Text = "B"

End If

If str(1) = "b" Then

Chr11.Text = "B"

End If

If str(2) = "b" Then

Chr10.Text = "B"

End If

If str(3) = "b" Then

Chr9.Text = "B"

End If

If str(4) = "b" Then

Chr8.Text = "B"

End If

If str(5) = "b" Then

Chr7.Text = "B"

End If

If str(6) = "b" Then

Chr6.Text = "B"

End If

If str(7) = "b" Then

Chr5.Text = "B"

End If

If str(8) = "b" Then

Chr4.Text = "B"

End If

If str(9) = "b" Then

Chr3.Text = "B"

End If

If str(10) = "b" Then

Chr2.Text = "B"

End If

If str(11) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 13 Then

If str(0) = "b" Then

Chr13.Text = "B"

End If

If str(1) = "b" Then

Chr12.Text = "B"

End If

If str(2) = "b" Then

Chr11.Text = "B"

End If

If str(3) = "b" Then

Chr10.Text = "B"

End If

If str(4) = "b" Then

Chr9.Text = "B"

End If

If str(5) = "b" Then

Chr8.Text = "B"

End If

If str(6) = "b" Then

Chr7.Text = "B"

End If

If str(7) = "b" Then

Chr6.Text = "B"

End If

If str(8) = "b" Then

Chr5.Text = "B"

End If

If str(9) = "b" Then

Chr4.Text = "B"

End If

If str(10) = "b" Then

Chr3.Text = "B"

End If

If str(11) = "b" Then

Chr2.Text = "B"

End If

If str(12) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 14 Then

If str(0) = "b" Then

Chr14.Text = "B"

End If

If str(1) = "b" Then

Chr13.Text = "B"

End If

If str(2) = "b" Then

Chr12.Text = "B"

End If

If str(3) = "b" Then

Chr11.Text = "B"

End If

If str(4) = "b" Then

Chr10.Text = "B"

End If

If str(5) = "b" Then

Chr9.Text = "B"

End If

If str(6) = "b" Then

Chr8.Text = "B"

End If

If str(7) = "b" Then

Chr7.Text = "B"

End If

If str(8) = "b" Then

Chr6.Text = "B"

End If

If str(9) = "b" Then

Chr5.Text = "B"

End If

If str(10) = "b" Then

Chr4.Text = "B"

End If

If str(11) = "b" Then

Chr3.Text = "B"

End If

If str(12) = "b" Then

Chr2.Text = "B"

End If

If str(13) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 15 Then

If str(0) = "b" Then

Chr15.Text = "B"

End If

If str(1) = "b" Then

Chr14.Text = "B"

End If

If str(2) = "b" Then

Chr13.Text = "B"

End If

If str(3) = "b" Then

Chr12.Text = "B"

End If

If str(4) = "b" Then

Chr11.Text = "B"

End If

If str(5) = "b" Then

Chr10.Text = "B"

End If

If str(6) = "b" Then

Chr9.Text = "B"

End If

If str(7) = "b" Then

Chr8.Text = "B"

End If

If str(8) = "b" Then

Chr7.Text = "B"

End If

If str(9) = "b" Then

Chr6.Text = "B"

End If

If str(10) = "b" Then

Chr5.Text = "B"

End If

If str(11) = "b" Then

Chr4.Text = "B"

End If

If str(12) = "b" Then

Chr3.Text = "B"

End If

If str(13) = "b" Then

Chr2.Text = "B"

End If

If str(14) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 16 Then

If str(0) = "b" Then

Chr16.Text = "B"

End If

If str(1) = "b" Then

Chr15.Text = "B"

End If

If str(2) = "b" Then

Chr14.Text = "B"

End If

If str(3) = "b" Then

Chr13.Text = "B"

End If

If str(4) = "b" Then

Chr12.Text = "B"

End If

If str(5) = "b" Then

Chr11.Text = "B"

End If

If str(6) = "b" Then

Chr10.Text = "B"

End If

If str(7) = "b" Then

Chr9.Text = "B"

End If

If str(8) = "b" Then

Chr8.Text = "B"

End If

If str(9) = "b" Then

Chr7.Text = "B"

End If

If str(10) = "b" Then

Chr6.Text = "B"

End If

If str(11) = "b" Then

Chr5.Text = "B"

End If

If str(12) = "b" Then

Chr4.Text = "B"

End If

If str(13) = "b" Then

Chr3.Text = "B"

End If

If str(14) = "b" Then

Chr2.Text = "B"

End If

If str(15) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 17 Then

If str(0) = "b" Then

Chr17.Text = "B"

End If

If str(1) = "b" Then

Chr16.Text = "B"

End If

If str(2) = "b" Then

Chr15.Text = "B"

End If

If str(3) = "b" Then

Chr14.Text = "B"

End If

If str(4) = "b" Then

Chr13.Text = "B"

End If

If str(5) = "b" Then

Chr12.Text = "B"

End If

If str(6) = "b" Then

Chr11.Text = "B"

End If

If str(7) = "b" Then

Chr10.Text = "B"

End If

If str(8) = "b" Then

Chr9.Text = "B"

End If

If str(9) = "b" Then

Chr8.Text = "B"

End If

If str(10) = "b" Then

Chr7.Text = "B"

End If

If str(11) = "b" Then

Chr6.Text = "B"

End If

If str(12) = "b" Then

Chr5.Text = "B"

End If

If str(13) = "b" Then

Chr4.Text = "B"

End If

If str(14) = "b" Then

Chr3.Text = "B"

End If

If str(15) = "b" Then

Chr2.Text = "B"

End If

If str(16) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 18 Then

If str(0) = "b" Then

Chr18.Text = "B"

End If

If str(1) = "b" Then

Chr17.Text = "B"

End If

If str(2) = "b" Then

Chr16.Text = "B"

End If

If str(3) = "b" Then

Chr15.Text = "B"

End If

If str(4) = "b" Then

Chr14.Text = "B"

End If

If str(5) = "b" Then

Chr13.Text = "B"

End If

If str(6) = "b" Then

Chr12.Text = "B"

End If

If str(7) = "b" Then

Chr11.Text = "B"

End If

If str(8) = "b" Then

Chr10.Text = "B"

End If

If str(9) = "b" Then

Chr9.Text = "B"

End If

If str(10) = "b" Then

Chr8.Text = "B"

End If

If str(11) = "b" Then

Chr7.Text = "B"

End If

If str(12) = "b" Then

Chr6.Text = "B"

End If

If str(13) = "b" Then

Chr5.Text = "B"

End If

If str(14) = "b" Then

Chr4.Text = "B"

End If

If str(15) = "b" Then

Chr3.Text = "B"

End If

If str(16) = "b" Then

Chr2.Text = "B"

End If

If str(17) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 19 Then

If str(0) = "b" Then

Chr19.Text = "B"

End If

If str(1) = "b" Then

Chr18.Text = "B"

End If

If str(2) = "b" Then

Chr17.Text = "B"

End If

If str(3) = "b" Then

Chr16.Text = "B"

End If

If str(4) = "b" Then

Chr15.Text = "B"

End If

If str(5) = "b" Then

Chr14.Text = "B"

End If

If str(6) = "b" Then

Chr13.Text = "B"

End If

If str(7) = "b" Then

Chr12.Text = "B"

End If

If str(8) = "b" Then

Chr11.Text = "B"

End If

If str(9) = "b" Then

Chr10.Text = "B"

End If

If str(10) = "b" Then

Chr9.Text = "B"

End If

If str(11) = "b" Then

Chr8.Text = "B"

End If

If str(12) = "b" Then

Chr7.Text = "B"

End If

If str(13) = "b" Then

Chr6.Text = "B"

End If

If str(14) = "b" Then

Chr5.Text = "B"

End If

If str(15) = "b" Then

Chr4.Text = "B"

End If

If str(16) = "b" Then

Chr3.Text = "B"

End If

If str(17) = "b" Then

Chr2.Text = "B"

End If

If str(18) = "b" Then

Chr1.Text = "B"

End If

ElseIf Word_in.TextLength = 20 Then

If str(0) = "b" Then

Chr20.Text = "B"

End If

If str(1) = "b" Then

Chr19.Text = "B"

End If

If str(2) = "b" Then

Chr18.Text = "B"

End If

If str(3) = "b" Then

Chr17.Text = "B"

End If

If str(4) = "b" Then

Chr16.Text = "B"

End If

If str(5) = "b" Then

Chr15.Text = "B"

End If

If str(6) = "b" Then

Chr14.Text = "B"

End If

If str(7) = "b" Then

Chr13.Text = "B"

End If

If str(8) = "b" Then

Chr12.Text = "B"

End If

If str(9) = "b" Then

Chr11.Text = "B"

End If

If str(10) = "b" Then

Chr10.Text = "B"

End If

If str(11) = "b" Then

Chr9.Text = "B"

End If

If str(12) = "b" Then

Chr8.Text = "B"

End If

If str(13) = "b" Then

Chr7.Text = "B"

End If

If str(14) = "b" Then

Chr6.Text = "B"

End If

If str(15) = "b" Then

Chr5.Text = "B"

End If

If str(16) = "b" Then

Chr4.Text = "B"

End If

If str(17) = "b" Then

Chr3.Text = "B"

End If

If str(18) = "b" Then

Chr2.Text = "B"

End If

If str(19) = "b" Then

Chr1.Text = "B"

End If

End If

If InStr(Word_in.Text, "b", CompareMethod.Text) = 0 Then

If f_chr1.Text = "" Then

f_chr1.Text = "B"

ElseIf f_chr2.Text = "" Then

f_chr2.Text = "B"

ElseIf f_chr3.Text = "" Then

f_chr3.Text = "B"

ElseIf f_chr4.Text = "" Then

f_chr4.Text = "B"

ElseIf f_chr5.Text = "" Then

f_chr5.Text = "B"

ElseIf f_chr6.Text = "" Then

f_chr6.Text = "B"

ElseIf f_chr7.Text = "" Then

f_chr7.Text = "B"

ElseIf f_chr8.Text = "" Then

f_chr8.Text = "B"

ElseIf f_chr9.Text = "" Then

f_chr9.Text = "B"

ElseIf f_chr10.Text = "" Then

f_chr10.Text = "B"

ElseIf f_chr11.Text = "" Then

f_chr11.Text = "B"

End If

End If

End Sub

Дважды щёлкаем по кнопке Button с именем Name для 3-й буквы C. Появившийся шаблон метода после записи нашего кода принимает следующий вид.

Листинг 19.4. Метод-обработчик щелчка кнопки.

Private Sub C_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles C.Click

C.Enabled = False

nums = Len(Word_in.Text)

Try

str(0) = Mid(Word_in.Text, nums, 1)

str(1) = Mid(Word_in.Text, nums – 1, 1)

str(2) = Mid(Word_in.Text, nums – 2, 1)

str(3) = Mid(Word_in.Text, nums – 3, 1)

str(4) = Mid(Word_in.Text, nums – 4, 1)

str(5) = Mid(Word_in.Text, nums – 5, 1)

str(6) = Mid(Word_in.Text, nums – 6, 1)

str(7) = Mid(Word_in.Text, nums – 7, 1)

str(8) = Mid(Word_in.Text, nums – 8, 1)

str(9) = Mid(Word_in.Text, nums – 9, 1)

str(10) = Mid(Word_in.Text, nums – 10, 1)

str(11) = Mid(Word_in.Text, nums – 11, 1)

str(12) = Mid(Word_in.Text, nums – 12, 1)

str(13) = Mid(Word_in.Text, nums – 13, 1)

str(14) = Mid(Word_in.Text, nums – 14, 1)

str(15) = Mid(Word_in.Text, nums – 15, 1)

str(16) = Mid(Word_in.Text, nums – 16, 1)

str(17) = Mid(Word_in.Text, nums – 17, 1)

str(18) = Mid(Word_in.Text, nums – 18, 1)

str(19) = Mid(Word_in.Text, nums – 19, 1)

Catch ex As Exception

End Try

If Word_in.TextLength = 1 Then

If str(0) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 2 Then

If str(1) = "c" Then

Chr1.Text = "C"

End If

If str(0) = "c" Then

Chr2.Text = "C"

End If

ElseIf Word_in.TextLength = 3 Then

If str(0) = "c" Then

Chr3.Text = "C"

End If

If str(1) = "c" Then

Chr2.Text = "C"

End If

If str(2) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 4 Then

If str(0) = "c" Then

Chr4.Text = "C"

End If

If str(1) = "c" Then

Chr3.Text = "C"

End If

If str(2) = "c" Then

Chr2.Text = "C"

End If

If str(3) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 5 Then

If str(0) = "c" Then

Chr5.Text = "C"

End If

If str(1) = "c" Then

Chr4.Text = "C"

End If

If str(2) = "c" Then

Chr3.Text = "C"

End If

If str(3) = "c" Then

Chr2.Text = "C"

End If

If str(4) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 6 Then

If str(0) = "c" Then

Chr6.Text = "C"

End If

If str(1) = "c" Then

Chr5.Text = "C"

End If

If str(2) = "c" Then

Chr4.Text = "C"

End If

If str(3) = "c" Then

Chr3.Text = "C"

End If

If str(4) = "c" Then

Chr2.Text = "C"

End If

If str(5) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 7 Then

If str(0) = "c" Then

Chr7.Text = "C"

End If

If str(1) = "c" Then

Chr6.Text = "C"

End If

If str(2) = "c" Then

Chr5.Text = "C"

End If

If str(3) = "c" Then

Chr4.Text = "C"

End If

If str(4) = "c" Then

Chr3.Text = "C"

End If

If str(5) = "c" Then

Chr2.Text = "C"

End If

If str(6) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 8 Then

If str(0) = "c" Then

Chr8.Text = "C"

End If

If str(1) = "c" Then

Chr7.Text = "C"

End If

If str(2) = "c" Then

Chr6.Text = "C"

End If

If str(3) = "c" Then

Chr5.Text = "C"

End If

If str(4) = "c" Then

Chr4.Text = "C"

End If

If str(5) = "c" Then

Chr3.Text = "C"

End If

If str(6) = "c" Then

Chr2.Text = "C"

End If

If str(7) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 9 Then

If str(0) = "c" Then

Chr9.Text = "C"

End If

If str(1) = "c" Then

Chr8.Text = "C"

End If

If str(2) = "c" Then

Chr7.Text = "C"

End If

If str(3) = "c" Then

Chr6.Text = "C"

End If

If str(4) = "c" Then

Chr5.Text = "C"

End If

If str(5) = "c" Then

Chr4.Text = "C"

End If

If str(6) = "c" Then

Chr3.Text = "C"

End If

If str(7) = "c" Then

Chr2.Text = "C"

End If

If str(8) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 10 Then

If str(0) = "c" Then

Chr10.Text = "C"

End If

If str(1) = "c" Then

Chr9.Text = "C"

End If

If str(2) = "c" Then

Chr8.Text = "C"

End If

If str(3) = "c" Then

Chr7.Text = "C"

End If

If str(4) = "c" Then

Chr6.Text = "C"

End If

If str(5) = "c" Then

Chr5.Text = "C"

End If

If str(6) = "c" Then

Chr4.Text = "C"

End If

If str(7) = "c" Then

Chr3.Text = "C"

End If

If str(8) = "c" Then

Chr2.Text = "C"

End If

If str(9) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 11 Then

If str(0) = "c" Then

Chr11.Text = "C"

End If

If str(1) = "c" Then

Chr10.Text = "C"

End If

If str(2) = "c" Then

Chr9.Text = "C"

End If

If str(3) = "c" Then

Chr8.Text = "C"

End If

If str(4) = "c" Then

Chr7.Text = "C"

End If

If str(5) = "c" Then

Chr6.Text = "C"

End If

If str(6) = "c" Then

Chr5.Text = "C"

End If

If str(7) = "c" Then

Chr4.Text = "C"

End If

If str(8) = "c" Then

Chr3.Text = "C"

End If

If str(9) = "c" Then

Chr2.Text = "C"

End If

If str(10) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 12 Then

If str(0) = "c" Then

Chr12.Text = "C"

End If

If str(1) = "c" Then

Chr11.Text = "C"

End If

If str(2) = "c" Then

Chr10.Text = "C"

End If

If str(3) = "c" Then

Chr9.Text = "C"

End If

If str(4) = "c" Then

Chr8.Text = "C"

End If

If str(5) = "c" Then

Chr7.Text = "C"

End If

If str(6) = "c" Then

Chr6.Text = "C"

End If

If str(7) = "c" Then

Chr5.Text = "C"

End If

If str(8) = "c" Then

Chr4.Text = "C"

End If

If str(9) = "c" Then

Chr3.Text = "C"

End If

If str(10) = "c" Then

Chr2.Text = "C"

End If

If str(11) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 13 Then

If str(0) = "c" Then

Chr13.Text = "C"

End If

If str(1) = "c" Then

Chr12.Text = "C"

End If

If str(2) = "c" Then

Chr11.Text = "C"

End If

If str(3) = "c" Then

Chr10.Text = "C"

End If

If str(4) = "c" Then

Chr9.Text = "C"

End If

If str(5) = "c" Then

Chr8.Text = "C"

End If

If str(6) = "c" Then

Chr7.Text = "C"

End If

If str(7) = "c" Then

Chr6.Text = "C"

End If

If str(8) = "c" Then

Chr5.Text = "C"

End If

If str(9) = "c" Then

Chr4.Text = "C"

End If

If str(10) = "c" Then

Chr3.Text = "C"

End If

If str(11) = "c" Then

Chr2.Text = "C"

End If

If str(12) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 14 Then

If str(0) = "c" Then

Chr14.Text = "C"

End If

If str(1) = "c" Then

Chr13.Text = "C"

End If

If str(2) = "c" Then

Chr12.Text = "C"

End If

If str(3) = "c" Then

Chr11.Text = "C"

End If

If str(4) = "c" Then

Chr10.Text = "C"

End If

If str(5) = "c" Then

Chr9.Text = "C"

End If

If str(6) = "c" Then

Chr8.Text = "C"

End If

If str(7) = "c" Then

Chr7.Text = "C"

End If

If str(8) = "c" Then

Chr6.Text = "C"

End If

If str(9) = "c" Then

Chr5.Text = "C"

End If

If str(10) = "c" Then

Chr4.Text = "C"

End If

If str(11) = "c" Then

Chr3.Text = "C"

End If

If str(12) = "c" Then

Chr2.Text = "C"

End If

If str(13) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 15 Then

If str(0) = "c" Then

Chr15.Text = "C"

End If

If str(1) = "c" Then

Chr14.Text = "C"

End If

If str(2) = "c" Then

Chr13.Text = "C"

End If

If str(3) = "c" Then

Chr12.Text = "C"

End If

If str(4) = "c" Then

Chr11.Text = "C"

End If

If str(5) = "c" Then

Chr10.Text = "C"

End If

If str(6) = "c" Then

Chr9.Text = "C"

End If

If str(7) = "c" Then

Chr8.Text = "C"

End If

If str(8) = "c" Then

Chr7.Text = "C"

End If

If str(9) = "c" Then

Chr6.Text = "C"

End If

If str(10) = "c" Then

Chr5.Text = "C"

End If

If str(11) = "c" Then

Chr4.Text = "C"

End If

If str(12) = "c" Then

Chr3.Text = "C"

End If

If str(13) = "c" Then

Chr2.Text = "C"

End If

If str(14) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 16 Then

If str(0) = "c" Then

Chr16.Text = "C"

End If

If str(1) = "c" Then

Chr15.Text = "C"

End If

If str(2) = "c" Then

Chr14.Text = "C"

End If

If str(3) = "c" Then

Chr13.Text = "C"

End If

If str(4) = "c" Then

Chr12.Text = "C"

End If

If str(5) = "c" Then

Chr11.Text = "C"

End If

If str(6) = "c" Then

Chr10.Text = "C"

End If

If str(7) = "c" Then

Chr9.Text = "C"

End If

If str(8) = "c" Then

Chr8.Text = "C"

End If

If str(9) = "c" Then

Chr7.Text = "C"

End If

If str(10) = "c" Then

Chr6.Text = "C"

End If

If str(11) = "c" Then

Chr5.Text = "C"

End If

If str(12) = "c" Then

Chr4.Text = "C"

End If

If str(13) = "c" Then

Chr3.Text = "C"

End If

If str(14) = "c" Then

Chr2.Text = "C"

End If

If str(15) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 17 Then

If str(0) = "c" Then

Chr17.Text = "C"

End If

If str(1) = "c" Then

Chr16.Text = "C"

End If

If str(2) = "c" Then

Chr15.Text = "C"

End If

If str(3) = "c" Then

Chr14.Text = "C"

End If

If str(4) = "c" Then

Chr13.Text = "C"

End If

If str(5) = "c" Then

Chr12.Text = "C"

End If

If str(6) = "c" Then

Chr11.Text = "C"

End If

If str(7) = "c" Then

Chr10.Text = "C"

End If

If str(8) = "c" Then

Chr9.Text = "C"

End If

If str(9) = "c" Then

Chr8.Text = "C"

End If

If str(10) = "c" Then

Chr7.Text = "C"

End If

If str(11) = "c" Then

Chr6.Text = "C"

End If

If str(12) = "c" Then

Chr5.Text = "C"

End If

If str(13) = "c" Then

Chr4.Text = "C"

End If

If str(14) = "c" Then

Chr3.Text = "C"

End If

If str(15) = "c" Then

Chr2.Text = "C"

End If

If str(16) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 18 Then

If str(0) = "c" Then

Chr18.Text = "C"

End If

If str(1) = "c" Then

Chr17.Text = "C"

End If

If str(2) = "c" Then

Chr16.Text = "C"

End If

If str(3) = "c" Then

Chr15.Text = "C"

End If

If str(4) = "c" Then

Chr14.Text = "C"

End If

If str(5) = "c" Then

Chr13.Text = "C"

End If

If str(6) = "c" Then

Chr12.Text = "C"

End If

If str(7) = "c" Then

Chr11.Text = "C"

End If

If str(8) = "c" Then

Chr10.Text = "C"

End If

If str(9) = "c" Then

Chr9.Text = "C"

End If

If str(10) = "c" Then

Chr8.Text = "C"

End If

If str(11) = "c" Then

Chr7.Text = "C"

End If

If str(12) = "c" Then

Chr6.Text = "C"

End If

If str(13) = "c" Then

Chr5.Text = "C"

End If

If str(14) = "c" Then

Chr4.Text = "C"

End If

If str(15) = "c" Then

Chr3.Text = "C"

End If

If str(16) = "c" Then

Chr2.Text = "C"

End If

If str(17) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 19 Then

If str(0) = "c" Then

Chr19.Text = "C"

End If

If str(1) = "c" Then

Chr18.Text = "C"

End If

If str(2) = "c" Then

Chr17.Text = "C"

End If

If str(3) = "c" Then

Chr16.Text = "C"

End If

If str(4) = "c" Then

Chr15.Text = "C"

End If

If str(5) = "c" Then

Chr14.Text = "C"

End If

If str(6) = "c" Then

Chr13.Text = "C"

End If

If str(7) = "c" Then

Chr12.Text = "C"

End If

If str(8) = "c" Then

Chr11.Text = "C"

End If

If str(9) = "c" Then

Chr10.Text = "C"

End If

If str(10) = "c" Then

Chr9.Text = "C"

End If

If str(11) = "c" Then

Chr8.Text = "C"

End If

If str(12) = "c" Then

Chr7.Text = "C"

End If

If str(13) = "c" Then

Chr6.Text = "C"

End If

If str(14) = "c" Then

Chr5.Text = "C"

End If

If str(15) = "c" Then

Chr4.Text = "C"

End If

If str(16) = "c" Then

Chr3.Text = "C"

End If

If str(17) = "c" Then

Chr2.Text = "C"

End If

If str(18) = "c" Then

Chr1.Text = "C"

End If

ElseIf Word_in.TextLength = 20 Then

If str(0) = "c" Then

Chr20.Text = "C"

End If

If str(1) = "c" Then

Chr19.Text = "C"

End If

If str(2) = "c" Then

Chr18.Text = "C"

End If

If str(3) = "c" Then

Chr17.Text = "C"

End If

If str(4) = "c" Then

Chr16.Text = "C"

End If

If str(5) = "c" Then

Chr15.Text = "C"

End If

If str(6) = "c" Then

Chr14.Text = "C"

End If

If str(7) = "c" Then

Chr13.Text = "C"

End If

If str(8) = "c" Then

Chr12.Text = "C"

End If

If str(9) = "c" Then

Chr11.Text = "C"

End If

If str(10) = "c" Then

Chr10.Text = "C"

End If

If str(11) = "c" Then

Chr9.Text = "C"

End If

If str(12) = "c" Then

Chr8.Text = "C"

End If

If str(13) = "c" Then

Chr7.Text = "C"

End If

If str(14) = "c" Then

Chr6.Text = "C"

End If

If str(15) = "c" Then

Chr5.Text = "C"

End If

If str(16) = "c" Then

Chr4.Text = "C"

End If

If str(17) = "c" Then

Chr3.Text = "C"

End If

If str(18) = "c" Then

Chr2.Text = "C"

End If

If str(19) = "c" Then

Chr1.Text = "C"

End If

End If

If InStr(Word_in.Text, "c", CompareMethod.Text) = 0 Then

If f_chr1.Text = "" Then

f_chr1.Text = "C"

ElseIf f_chr2.Text = "" Then

f_chr2.Text = "C"

ElseIf f_chr3.Text = "" Then

f_chr3.Text = "C"

ElseIf f_chr4.Text = "" Then

f_chr4.Text = "C"

ElseIf f_chr5.Text = "" Then

f_chr5.Text = "C"

ElseIf f_chr6.Text = "" Then

f_chr6.Text = "C"

ElseIf f_chr7.Text = "" Then

f_chr7.Text = "C"

ElseIf f_chr8.Text = "" Then

f_chr8.Text = "C"

ElseIf f_chr9.Text = "" Then

f_chr9.Text = "C"

ElseIf f_chr10.Text = "" Then

f_chr10.Text = "C"

ElseIf f_chr11.Text = "" Then

f_chr11.Text = "C"

End If

End If

End Sub

Дважды щёлкаем по кнопке Button с именем Name для 4-й буквы D. Появившийся шаблон метода после записи нашего кода принимает следующий вид.

Листинг 19.5. Метод-обработчик щелчка кнопки.

Private Sub D_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles D.Click

D.Enabled = False

nums = Len(Word_in.Text)

Try

str(0) = Mid(Word_in.Text, nums, 1)

str(1) = Mid(Word_in.Text, nums – 1, 1)

str(2) = Mid(Word_in.Text, nums – 2, 1)

str(3) = Mid(Word_in.Text, nums – 3, 1)

str(4) = Mid(Word_in.Text, nums – 4, 1)

str(5) = Mid(Word_in.Text, nums – 5, 1)

str(6) = Mid(Word_in.Text, nums – 6, 1)

str(7) = Mid(Word_in.Text, nums – 7, 1)

str(8) = Mid(Word_in.Text, nums – 8, 1)

str(9) = Mid(Word_in.Text, nums – 9, 1)

str(10) = Mid(Word_in.Text, nums – 10, 1)

str(11) = Mid(Word_in.Text, nums – 11, 1)

str(12) = Mid(Word_in.Text, nums – 12, 1)

str(13) = Mid(Word_in.Text, nums – 13, 1)

str(14) = Mid(Word_in.Text, nums – 14, 1)

str(15) = Mid(Word_in.Text, nums – 15, 1)

str(16) = Mid(Word_in.Text, nums – 16, 1)

str(17) = Mid(Word_in.Text, nums – 17, 1)

str(18) = Mid(Word_in.Text, nums – 18, 1)

str(19) = Mid(Word_in.Text, nums – 19, 1)

Catch ex As Exception

End Try

If Word_in.TextLength = 1 Then

If str(0) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 2 Then

If str(1) = "d" Then

Chr1.Text = "D"

End If

If str(0) = "d" Then

Chr2.Text = "D"

End If

ElseIf Word_in.TextLength = 3 Then

If str(0) = "d" Then

Chr3.Text = "D"

End If

If str(1) = "d" Then

Chr2.Text = "D"

End If

If str(2) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 4 Then

If str(0) = "d" Then

Chr4.Text = "D"

End If

If str(1) = "d" Then

Chr3.Text = "D"

End If

If str(2) = "d" Then

Chr2.Text = "D"

End If

If str(3) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 5 Then

If str(0) = "d" Then

Chr5.Text = "D"

End If

If str(1) = "d" Then

Chr4.Text = "D"

End If

If str(2) = "d" Then

Chr3.Text = "D"

End If

If str(3) = "d" Then

Chr2.Text = "D"

End If

If str(4) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 6 Then

If str(0) = "d" Then

Chr6.Text = "D"

End If

If str(1) = "d" Then

Chr5.Text = "D"

End If

If str(2) = "d" Then

Chr4.Text = "D"

End If

If str(3) = "d" Then

Chr3.Text = "D"

End If

If str(4) = "d" Then

Chr2.Text = "D"

End If

If str(5) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 7 Then

If str(0) = "d" Then

Chr7.Text = "D"

End If

If str(1) = "d" Then

Chr6.Text = "D"

End If

If str(2) = "d" Then

Chr5.Text = "D"

End If

If str(3) = "d" Then

Chr4.Text = "D"

End If

If str(4) = "d" Then

Chr3.Text = "D"

End If

If str(5) = "d" Then

Chr2.Text = "D"

End If

If str(6) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 8 Then

If str(0) = "d" Then

Chr8.Text = "D"

End If

If str(1) = "d" Then

Chr7.Text = "D"

End If

If str(2) = "d" Then

Chr6.Text = "D"

End If

If str(3) = "d" Then

Chr5.Text = "D"

End If

If str(4) = "d" Then

Chr4.Text = "D"

End If

If str(5) = "d" Then

Chr3.Text = "D"

End If

If str(6) = "d" Then

Chr2.Text = "D"

End If

If str(7) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 9 Then

If str(0) = "d" Then

Chr9.Text = "D"

End If

If str(1) = "d" Then

Chr8.Text = "D"

End If

If str(2) = "d" Then

Chr7.Text = "D"

End If

If str(3) = "d" Then

Chr6.Text = "D"

End If

If str(4) = "d" Then

Chr5.Text = "D"

End If

If str(5) = "d" Then

Chr4.Text = "D"

End If

If str(6) = "d" Then

Chr3.Text = "D"

End If

If str(7) = "d" Then

Chr2.Text = "D"

End If

If str(8) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 10 Then

If str(0) = "d" Then

Chr10.Text = "D"

End If

If str(1) = "d" Then

Chr9.Text = "D"

End If

If str(2) = "d" Then

Chr8.Text = "D"

End If

If str(3) = "d" Then

Chr7.Text = "D"

End If

If str(4) = "d" Then

Chr6.Text = "D"

End If

If str(5) = "d" Then

Chr5.Text = "D"

End If

If str(6) = "d" Then

Chr4.Text = "D"

End If

If str(7) = "d" Then

Chr3.Text = "D"

End If

If str(8) = "d" Then

Chr2.Text = "D"

End If

If str(9) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 11 Then

If str(0) = "d" Then

Chr11.Text = "D"

End If

If str(1) = "d" Then

Chr10.Text = "D"

End If

If str(2) = "d" Then

Chr9.Text = "D"

End If

If str(3) = "d" Then

Chr8.Text = "D"

End If

If str(4) = "d" Then

Chr7.Text = "D"

End If

If str(5) = "d" Then

Chr6.Text = "D"

End If

If str(6) = "d" Then

Chr5.Text = "D"

End If

If str(7) = "d" Then

Chr4.Text = "D"

End If

If str(8) = "d" Then

Chr3.Text = "D"

End If

If str(9) = "d" Then

Chr2.Text = "D"

End If

If str(10) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 12 Then

If str(0) = "d" Then

Chr12.Text = "D"

End If

If str(1) = "d" Then

Chr11.Text = "D"

End If

If str(2) = "d" Then

Chr10.Text = "D"

End If

If str(3) = "d" Then

Chr9.Text = "D"

End If

If str(4) = "d" Then

Chr8.Text = "D"

End If

If str(5) = "d" Then

Chr7.Text = "D"

End If

If str(6) = "d" Then

Chr6.Text = "D"

End If

If str(7) = "d" Then

Chr5.Text = "D"

End If

If str(8) = "d" Then

Chr4.Text = "D"

End If

If str(9) = "d" Then

Chr3.Text = "D"

End If

If str(10) = "d" Then

Chr2.Text = "D"

End If

If str(11) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 13 Then

If str(0) = "d" Then

Chr13.Text = "D"

End If

If str(1) = "d" Then

Chr12.Text = "D"

End If

If str(2) = "d" Then

Chr11.Text = "D"

End If

If str(3) = "d" Then

Chr10.Text = "D"

End If

If str(4) = "d" Then

Chr9.Text = "D"

End If

If str(5) = "d" Then

Chr8.Text = "D"

End If

If str(6) = "d" Then

Chr7.Text = "D"

End If

If str(7) = "d" Then

Chr6.Text = "D"

End If

If str(8) = "d" Then

Chr5.Text = "D"

End If

If str(9) = "d" Then

Chr4.Text = "D"

End If

If str(10) = "d" Then

Chr3.Text = "D"

End If

If str(11) = "d" Then

Chr2.Text = "D"

End If

If str(12) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 14 Then

If str(0) = "d" Then

Chr14.Text = "D"

End If

If str(1) = "d" Then

Chr13.Text = "D"

End If

If str(2) = "d" Then

Chr12.Text = "D"

End If

If str(3) = "d" Then

Chr11.Text = "D"

End If

If str(4) = "d" Then

Chr10.Text = "D"

End If

If str(5) = "d" Then

Chr9.Text = "D"

End If

If str(6) = "d" Then

Chr8.Text = "D"

End If

If str(7) = "d" Then

Chr7.Text = "D"

End If

If str(8) = "d" Then

Chr6.Text = "D"

End If

If str(9) = "d" Then

Chr5.Text = "D"

End If

If str(10) = "d" Then

Chr4.Text = "D"

End If

If str(11) = "d" Then

Chr3.Text = "D"

End If

If str(12) = "d" Then

Chr2.Text = "D"

End If

If str(13) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 15 Then

If str(0) = "d" Then

Chr15.Text = "D"

End If

If str(1) = "d" Then

Chr14.Text = "D"

End If

If str(2) = "d" Then

Chr13.Text = "D"

End If

If str(3) = "d" Then

Chr12.Text = "D"

End If

If str(4) = "d" Then

Chr11.Text = "D"

End If

If str(5) = "d" Then

Chr10.Text = "D"

End If

If str(6) = "d" Then

Chr9.Text = "D"

End If

If str(7) = "d" Then

Chr8.Text = "D"

End If

If str(8) = "d" Then

Chr7.Text = "D"

End If

If str(9) = "d" Then

Chr6.Text = "D"

End If

If str(10) = "d" Then

Chr5.Text = "D"

End If

If str(11) = "d" Then

Chr4.Text = "D"

End If

If str(12) = "d" Then

Chr3.Text = "D"

End If

If str(13) = "d" Then

Chr2.Text = "D"

End If

If str(14) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 16 Then

If str(0) = "d" Then

Chr16.Text = "D"

End If

If str(1) = "d" Then

Chr15.Text = "D"

End If

If str(2) = "d" Then

Chr14.Text = "D"

End If

If str(3) = "d" Then

Chr13.Text = "D"

End If

If str(4) = "d" Then

Chr12.Text = "D"

End If

If str(5) = "d" Then

Chr11.Text = "D"

End If

If str(6) = "d" Then

Chr10.Text = "D"

End If

If str(7) = "d" Then

Chr9.Text = "D"

End If

If str(8) = "d" Then

Chr8.Text = "D"

End If

If str(9) = "d" Then

Chr7.Text = "D"

End If

If str(10) = "d" Then

Chr6.Text = "D"

End If

If str(11) = "d" Then

Chr5.Text = "D"

End If

If str(12) = "d" Then

Chr4.Text = "D"

End If

If str(13) = "d" Then

Chr3.Text = "D"

End If

If str(14) = "d" Then

Chr2.Text = "D"

End If

If str(15) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 17 Then

If str(0) = "d" Then

Chr17.Text = "D"

End If

If str(1) = "d" Then

Chr16.Text = "D"

End If

If str(2) = "d" Then

Chr15.Text = "D"

End If

If str(3) = "d" Then

Chr14.Text = "D"

End If

If str(4) = "d" Then

Chr13.Text = "D"

End If

If str(5) = "d" Then

Chr12.Text = "D"

End If

If str(6) = "d" Then

Chr11.Text = "D"

End If

If str(7) = "d" Then

Chr10.Text = "D"

End If

If str(8) = "d" Then

Chr9.Text = "D"

End If

If str(9) = "d" Then

Chr8.Text = "D"

End If

If str(10) = "d" Then

Chr7.Text = "D"

End If

If str(11) = "d" Then

Chr6.Text = "D"

End If

If str(12) = "d" Then

Chr5.Text = "D"

End If

If str(13) = "d" Then

Chr4.Text = "D"

End If

If str(14) = "d" Then

Chr3.Text = "D"

End If

If str(15) = "d" Then

Chr2.Text = "D"

End If

If str(16) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 18 Then

If str(0) = "d" Then

Chr18.Text = "D"

End If

If str(1) = "d" Then

Chr17.Text = "D"

End If

If str(2) = "d" Then

Chr16.Text = "D"

End If

If str(3) = "d" Then

Chr15.Text = "D"

End If

If str(4) = "d" Then

Chr14.Text = "D"

End If

If str(5) = "d" Then

Chr13.Text = "D"

End If

If str(6) = "d" Then

Chr12.Text = "D"

End If

If str(7) = "d" Then

Chr11.Text = "D"

End If

If str(8) = "d" Then

Chr10.Text = "D"

End If

If str(9) = "d" Then

Chr9.Text = "D"

End If

If str(10) = "d" Then

Chr8.Text = "D"

End If

If str(11) = "d" Then

Chr7.Text = "D"

End If

If str(12) = "d" Then

Chr6.Text = "D"

End If

If str(13) = "d" Then

Chr5.Text = "D"

End If

If str(14) = "d" Then

Chr4.Text = "D"

End If

If str(15) = "d" Then

Chr3.Text = "D"

End If

If str(16) = "d" Then

Chr2.Text = "D"

End If

If str(17) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 19 Then

If str(0) = "d" Then

Chr19.Text = "D"

End If

If str(1) = "d" Then

Chr18.Text = "D"

End If

If str(2) = "d" Then

Chr17.Text = "D"

End If

If str(3) = "d" Then

Chr16.Text = "D"

End If

If str(4) = "d" Then

Chr15.Text = "D"

End If

If str(5) = "d" Then

Chr14.Text = "D"

End If

If str(6) = "d" Then

Chr13.Text = "D"

End If

If str(7) = "d" Then

Chr12.Text = "D"

End If

If str(8) = "d" Then

Chr11.Text = "D"

End If

If str(9) = "d" Then

Chr10.Text = "D"

End If

If str(10) = "d" Then

Chr9.Text = "D"

End If

If str(11) = "d" Then

Chr8.Text = "D"

End If

If str(12) = "d" Then

Chr7.Text = "D"

End If

If str(13) = "d" Then

Chr6.Text = "D"

End If

If str(14) = "d" Then

Chr5.Text = "D"

End If

If str(15) = "d" Then

Chr4.Text = "D"

End If

If str(16) = "d" Then

Chr3.Text = "D"

End If

If str(17) = "d" Then

Chr2.Text = "D"

End If

If str(18) = "d" Then

Chr1.Text = "D"

End If

ElseIf Word_in.TextLength = 20 Then

If str(0) = "d" Then

Chr20.Text = "D"

End If

If str(1) = "d" Then

Chr19.Text = "D"

End If

If str(2) = "d" Then

Chr18.Text = "D"

End If

If str(3) = "d" Then

Chr17.Text = "D"

End If

If str(4) = "d" Then

Chr16.Text = "D"

End If

If str(5) = "d" Then

Chr15.Text = "D"

End If

If str(6) = "d" Then

Chr14.Text = "D"

End If

If str(7) = "d" Then

Chr13.Text = "D"

End If

If str(8) = "d" Then

Chr12.Text = "D"

End If

If str(9) = "d" Then

Chr11.Text = "D"

End If

If str(10) = "d" Then

Chr10.Text = "D"

End If

If str(11) = "d" Then

Chr9.Text = "D"

End If

If str(12) = "d" Then

Chr8.Text = "D"

End If

If str(13) = "d" Then

Chr7.Text = "D"

End If

If str(14) = "d" Then

Chr6.Text = "D"

End If

If str(15) = "d" Then

Chr5.Text = "D"

End If

If str(16) = "d" Then

Chr4.Text = "D"

End If

If str(17) = "d" Then

Chr3.Text = "D"

End If

If str(18) = "d" Then

Chr2.Text = "D"

End If

If str(19) = "d" Then

Chr1.Text = "D"

End If

End If

If InStr(Word_in.Text, "d", CompareMethod.Text) = 0 Then

If f_chr1.Text = "" Then

f_chr1.Text = "D"

ElseIf f_chr2.Text = "" Then

f_chr2.Text = "D"

ElseIf f_chr3.Text = "" Then

f_chr3.Text = "D"

ElseIf f_chr4.Text = "" Then

f_chr4.Text = "D"

ElseIf f_chr5.Text = "" Then

f_chr5.Text = "D"

ElseIf f_chr6.Text = "" Then

f_chr6.Text = "D"

ElseIf f_chr7.Text = "" Then

f_chr7.Text = "D"

ElseIf f_chr8.Text = "" Then

f_chr8.Text = "D"

ElseIf f_chr9.Text = "" Then

f_chr9.Text = "D"

ElseIf f_chr10.Text = "" Then

f_chr10.Text = "D"

ElseIf f_chr11.Text = "" Then

f_chr11.Text = "D"

End If

End If

End Sub

Дважды щёлкаем по кнопке Button с именем Name для 5-й буквы Er (объяснение, почему здесь не E, а Er, дано выше). Появившийся шаблон метода после записи нашего кода принимает следующий вид.

Листинг 19.6. Метод-обработчик щелчка кнопки.

Private Sub E_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles Er.Click

Er.Enabled = False

nums = Len(Word_in.Text)

Try

str(0) = Mid(Word_in.Text, nums, 1)

str(1) = Mid(Word_in.Text, nums – 1, 1)

str(2) = Mid(Word_in.Text, nums – 2, 1)

str(3) = Mid(Word_in.Text, nums – 3, 1)

str(4) = Mid(Word_in.Text, nums – 4, 1)

str(5) = Mid(Word_in.Text, nums – 5, 1)

str(6) = Mid(Word_in.Text, nums – 6, 1)

str(7) = Mid(Word_in.Text, nums – 7, 1)

str(8) = Mid(Word_in.Text, nums – 8, 1)

str(9) = Mid(Word_in.Text, nums – 9, 1)

str(10) = Mid(Word_in.Text, nums – 10, 1)

str(11) = Mid(Word_in.Text, nums – 11, 1)

str(12) = Mid(Word_in.Text, nums – 12, 1)

str(13) = Mid(Word_in.Text, nums – 13, 1)

str(14) = Mid(Word_in.Text, nums – 14, 1)

str(15) = Mid(Word_in.Text, nums – 15, 1)

str(16) = Mid(Word_in.Text, nums – 16, 1)

str(17) = Mid(Word_in.Text, nums – 17, 1)

str(18) = Mid(Word_in.Text, nums – 18, 1)

str(19) = Mid(Word_in.Text, nums – 19, 1)

Catch ex As Exception

End Try

If Word_in.TextLength = 1 Then

If str(0) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 2 Then

If str(1) = "e" Then

Chr1.Text = "E"

End If

If str(0) = "e" Then

Chr2.Text = "E"

End If

ElseIf Word_in.TextLength = 3 Then

If str(0) = "e" Then

Chr3.Text = "E"

End If

If str(1) = "e" Then

Chr2.Text = "E"

End If

If str(2) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 4 Then

If str(0) = "e" Then

Chr4.Text = "E"

End If

If str(1) = "e" Then

Chr3.Text = "E"

End If

If str(2) = "e" Then

Chr2.Text = "E"

End If

If str(3) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 5 Then

If str(0) = "e" Then

Chr5.Text = "E"

End If

If str(1) = "e" Then

Chr4.Text = "E"

End If

If str(2) = "e" Then

Chr3.Text = "E"

End If

If str(3) = "e" Then

Chr2.Text = "E"

End If

If str(4) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 6 Then

If str(0) = "e" Then

Chr6.Text = "E"

End If

If str(1) = "e" Then

Chr5.Text = "E"

End If

If str(2) = "e" Then

Chr4.Text = "E"

End If

If str(3) = "e" Then

Chr3.Text = "E"

End If

If str(4) = "e" Then

Chr2.Text = "E"

End If

If str(5) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 7 Then

If str(0) = "e" Then

Chr7.Text = "E"

End If

If str(1) = "e" Then

Chr6.Text = "E"

End If

If str(2) = "e" Then

Chr5.Text = "E"

End If

If str(3) = "e" Then

Chr4.Text = "E"

End If

If str(4) = "e" Then

Chr3.Text = "E"

End If

If str(5) = "e" Then

Chr2.Text = "E"

End If

If str(6) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 8 Then

If str(0) = "e" Then

Chr8.Text = "E"

End If

If str(1) = "e" Then

Chr7.Text = "E"

End If

If str(2) = "e" Then

Chr6.Text = "E"

End If

If str(3) = "e" Then

Chr5.Text = "E"

End If

If str(4) = "e" Then

Chr4.Text = "E"

End If

If str(5) = "e" Then

Chr3.Text = "E"

End If

If str(6) = "e" Then

Chr2.Text = "E"

End If

If str(7) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 9 Then

If str(0) = "e" Then

Chr9.Text = "E"

End If

If str(1) = "e" Then

Chr8.Text = "E"

End If

If str(2) = "e" Then

Chr7.Text = "E"

End If

If str(3) = "e" Then

Chr6.Text = "E"

End If

If str(4) = "e" Then

Chr5.Text = "E"

End If

If str(5) = "e" Then

Chr4.Text = "E"

End If

If str(6) = "e" Then

Chr3.Text = "E"

End If

If str(7) = "e" Then

Chr2.Text = "E"

End If

If str(8) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 10 Then

If str(0) = "e" Then

Chr10.Text = "E"

End If

If str(1) = "e" Then

Chr9.Text = "E"

End If

If str(2) = "e" Then

Chr8.Text = "E"

End If

If str(3) = "e" Then

Chr7.Text = "E"

End If

If str(4) = "e" Then

Chr6.Text = "E"

End If

If str(5) = "e" Then

Chr5.Text = "E"

End If

If str(6) = "e" Then

Chr4.Text = "E"

End If

If str(7) = "e" Then

Chr3.Text = "E"

End If

If str(8) = "e" Then

Chr2.Text = "E"

End If

If str(9) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 11 Then

If str(0) = "e" Then

Chr11.Text = "E"

End If

If str(1) = "e" Then

Chr10.Text = "E"

End If

If str(2) = "e" Then

Chr9.Text = "E"

End If

If str(3) = "e" Then

Chr8.Text = "E"

End If

If str(4) = "e" Then

Chr7.Text = "E"

End If

If str(5) = "e" Then

Chr6.Text = "E"

End If

If str(6) = "e" Then

Chr5.Text = "E"

End If

If str(7) = "e" Then

Chr4.Text = "E"

End If

If str(8) = "e" Then

Chr3.Text = "E"

End If

If str(9) = "e" Then

Chr2.Text = "E"

End If

If str(10) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 12 Then

If str(0) = "e" Then

Chr12.Text = "E"

End If

If str(1) = "e" Then

Chr11.Text = "E"

End If

If str(2) = "e" Then

Chr10.Text = "E"

End If

If str(3) = "e" Then

Chr9.Text = "E"

End If

If str(4) = "e" Then

Chr8.Text = "E"

End If

If str(5) = "e" Then

Chr7.Text = "E"

End If

If str(6) = "e" Then

Chr6.Text = "E"

End If

If str(7) = "e" Then

Chr5.Text = "E"

End If

If str(8) = "e" Then

Chr4.Text = "E"

End If

If str(9) = "e" Then

Chr3.Text = "E"

End If

If str(10) = "e" Then

Chr2.Text = "E"

End If

If str(11) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 13 Then

If str(0) = "e" Then

Chr13.Text = "E"

End If

If str(1) = "e" Then

Chr12.Text = "E"

End If

If str(2) = "e" Then

Chr11.Text = "E"

End If

If str(3) = "e" Then

Chr10.Text = "E"

End If

If str(4) = "e" Then

Chr9.Text = "E"

End If

If str(5) = "e" Then

Chr8.Text = "E"

End If

If str(6) = "e" Then

Chr7.Text = "E"

End If

If str(7) = "e" Then

Chr6.Text = "E"

End If

If str(8) = "e" Then

Chr5.Text = "E"

End If

If str(9) = "e" Then

Chr4.Text = "E"

End If

If str(10) = "e" Then

Chr3.Text = "E"

End If

If str(11) = "e" Then

Chr2.Text = "E"

End If

If str(12) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 14 Then

If str(0) = "e" Then

Chr14.Text = "E"

End If

If str(1) = "e" Then

Chr13.Text = "E"

End If

If str(2) = "e" Then

Chr12.Text = "E"

End If

If str(3) = "e" Then

Chr11.Text = "E"

End If

If str(4) = "e" Then

Chr10.Text = "E"

End If

If str(5) = "e" Then

Chr9.Text = "E"

End If

If str(6) = "e" Then

Chr8.Text = "E"

End If

If str(7) = "e" Then

Chr7.Text = "E"

End If

If str(8) = "e" Then

Chr6.Text = "E"

End If

If str(9) = "e" Then

Chr5.Text = "E"

End If

If str(10) = "e" Then

Chr4.Text = "E"

End If

If str(11) = "e" Then

Chr3.Text = "E"

End If

If str(12) = "e" Then

Chr2.Text = "E"

End If

If str(13) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 15 Then

If str(0) = "e" Then

Chr15.Text = "E"

End If

If str(1) = "e" Then

Chr14.Text = "E"

End If

If str(2) = "e" Then

Chr13.Text = "E"

End If

If str(3) = "e" Then

Chr12.Text = "E"

End If

If str(4) = "e" Then

Chr11.Text = "E"

End If

If str(5) = "e" Then

Chr10.Text = "E"

End If

If str(6) = "e" Then

Chr9.Text = "E"

End If

If str(7) = "e" Then

Chr8.Text = "E"

End If

If str(8) = "e" Then

Chr7.Text = "E"

End If

If str(9) = "e" Then

Chr6.Text = "E"

End If

If str(10) = "e" Then

Chr5.Text = "E"

End If

If str(11) = "e" Then

Chr4.Text = "E"

End If

If str(12) = "e" Then

Chr3.Text = "E"

End If

If str(13) = "e" Then

Chr2.Text = "E"

End If

If str(14) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 16 Then

If str(0) = "e" Then

Chr16.Text = "E"

End If

If str(1) = "e" Then

Chr15.Text = "E"

End If

If str(2) = "e" Then

Chr14.Text = "E"

End If

If str(3) = "e" Then

Chr13.Text = "E"

End If

If str(4) = "e" Then

Chr12.Text = "E"

End If

If str(5) = "e" Then

Chr11.Text = "E"

End If

If str(6) = "e" Then

Chr10.Text = "E"

End If

If str(7) = "e" Then

Chr9.Text = "E"

End If

If str(8) = "e" Then

Chr8.Text = "E"

End If

If str(9) = "e" Then

Chr7.Text = "E"

End If

If str(10) = "e" Then

Chr6.Text = "E"

End If

If str(11) = "e" Then

Chr5.Text = "E"

End If

If str(12) = "e" Then

Chr4.Text = "E"

End If

If str(13) = "e" Then

Chr3.Text = "E"

End If

If str(14) = "e" Then

Chr2.Text = "E"

End If

If str(15) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 17 Then

If str(0) = "e" Then

Chr17.Text = "E"

End If

If str(1) = "e" Then

Chr16.Text = "E"

End If

If str(2) = "e" Then

Chr15.Text = "E"

End If

If str(3) = "e" Then

Chr14.Text = "E"

End If

If str(4) = "e" Then

Chr13.Text = "E"

End If

If str(5) = "e" Then

Chr12.Text = "E"

End If

If str(6) = "e" Then

Chr11.Text = "E"

End If

If str(7) = "e" Then

Chr10.Text = "E"

End If

If str(8) = "e" Then

Chr9.Text = "E"

End If

If str(9) = "e" Then

Chr8.Text = "E"

End If

If str(10) = "e" Then

Chr7.Text = "E"

End If

If str(11) = "e" Then

Chr6.Text = "E"

End If

If str(12) = "e" Then

Chr5.Text = "E"

End If

If str(13) = "e" Then

Chr4.Text = "E"

End If

If str(14) = "e" Then

Chr3.Text = "E"

End If

If str(15) = "e" Then

Chr2.Text = "E"

End If

If str(16) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 18 Then

If str(0) = "e" Then

Chr18.Text = "E"

End If

If str(1) = "e" Then

Chr17.Text = "E"

End If

If str(2) = "e" Then

Chr16.Text = "E"

End If

If str(3) = "e" Then

Chr15.Text = "E"

End If

If str(4) = "e" Then

Chr14.Text = "E"

End If

If str(5) = "e" Then

Chr13.Text = "E"

End If

If str(6) = "e" Then

Chr12.Text = "E"

End If

If str(7) = "e" Then

Chr11.Text = "E"

End If

If str(8) = "e" Then

Chr10.Text = "E"

End If

If str(9) = "e" Then

Chr9.Text = "E"

End If

If str(10) = "e" Then

Chr8.Text = "E"

End If

If str(11) = "e" Then

Chr7.Text = "E"

End If

If str(12) = "e" Then

Chr6.Text = "E"

End If

If str(13) = "e" Then

Chr5.Text = "E"

End If

If str(14) = "e" Then

Chr4.Text = "E"

End If

If str(15) = "e" Then

Chr3.Text = "E"

End If

If str(16) = "e" Then

Chr2.Text = "E"

End If

If str(17) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 19 Then

If str(0) = "e" Then

Chr19.Text = "E"

End If

If str(1) = "e" Then

Chr18.Text = "E"

End If

If str(2) = "e" Then

Chr17.Text = "E"

End If

If str(3) = "e" Then

Chr16.Text = "E"

End If

If str(4) = "e" Then

Chr15.Text = "E"

End If

If str(5) = "e" Then

Chr14.Text = "E"

End If

If str(6) = "e" Then

Chr13.Text = "E"

End If

If str(7) = "e" Then

Chr12.Text = "E"

End If

If str(8) = "e" Then

Chr11.Text = "E"

End If

If str(9) = "e" Then

Chr10.Text = "E"

End If

If str(10) = "e" Then

Chr9.Text = "E"

End If

If str(11) = "e" Then

Chr8.Text = "E"

End If

If str(12) = "e" Then

Chr7.Text = "E"

End If

If str(13) = "e" Then

Chr6.Text = "E"

End If

If str(14) = "e" Then

Chr5.Text = "E"

End If

If str(15) = "e" Then

Chr4.Text = "E"

End If

If str(16) = "e" Then

Chr3.Text = "E"

End If

If str(17) = "e" Then

Chr2.Text = "E"

End If

If str(18) = "e" Then

Chr1.Text = "E"

End If

ElseIf Word_in.TextLength = 20 Then

If str(0) = "e" Then

Chr20.Text = "E"

End If

If str(1) = "e" Then

Chr19.Text = "E"

End If

If str(2) = "e" Then

Chr18.Text = "E"

End If

If str(3) = "e" Then

Chr17.Text = "E"

End If

If str(4) = "e" Then

Chr16.Text = "E"

End If

If str(5) = "e" Then

Chr15.Text = "E"

End If

If str(6) = "e" Then

Chr14.Text = "E"

End If

If str(7) = "e" Then

Chr13.Text = "E"

End If

If str(8) = "e" Then

Chr12.Text = "E"

End If

If str(9) = "e" Then

Chr11.Text = "E"

End If

If str(10) = "e" Then

Chr10.Text = "E"

End If

If str(11) = "e" Then

Chr9.Text = "E"

End If

If str(12) = "e" Then

Chr8.Text = "E"

End If

If str(13) = "e" Then

Chr7.Text = "E"

End If

If str(14) = "e" Then

Chr6.Text = "E"

End If

If str(15) = "e" Then

Chr5.Text = "E"

End If

If str(16) = "e" Then

Chr4.Text = "E"

End If

If str(17) = "e" Then

Chr3.Text = "E"

End If

If str(18) = "e" Then

Chr2.Text = "E"

End If

If str(19) = "e" Then

Chr1.Text = "E"

End If

End If

If InStr(Word_in.Text, "e", CompareMethod.Text) = 0 Then

If f_chr1.Text = "" Then

f_chr1.Text = "E"

ElseIf f_chr2.Text = "" Then

f_chr2.Text = "E"

ElseIf f_chr3.Text = "" Then

f_chr3.Text = "E"

ElseIf f_chr4.Text = "" Then

f_chr4.Text = "E"

ElseIf f_chr5.Text = "" Then

f_chr5.Text = "E"

ElseIf f_chr6.Text = "" Then

f_chr6.Text = "E"

ElseIf f_chr7.Text = "" Then

f_chr7.Text = "E"

ElseIf f_chr8.Text = "" Then

f_chr8.Text = "E"

ElseIf f_chr9.Text = "" Then

f_chr9.Text = "E"

ElseIf f_chr10.Text = "" Then

f_chr10.Text = "E"

ElseIf f_chr11.Text = "" Then

f_chr11.Text = "E"

End If

End If

End Sub

Дважды щёлкаем по кнопке Button с именем Name для 6-й буквы F. Появившийся шаблон метода после записи нашего кода принимает следующий вид.

Листинг 19.7. Метод-обработчик щелчка кнопки.

Private Sub F_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles F.Click

F.Enabled = False

nums = Len(Word_in.Text)

Try

str(0) = Mid(Word_in.Text, nums, 1)

str(1) = Mid(Word_in.Text, nums – 1, 1)

str(2) = Mid(Word_in.Text, nums – 2, 1)

str(3) = Mid(Word_in.Text, nums – 3, 1)

str(4) = Mid(Word_in.Text, nums – 4, 1)

str(5) = Mid(Word_in.Text, nums – 5, 1)

str(6) = Mid(Word_in.Text, nums – 6, 1)

str(7) = Mid(Word_in.Text, nums – 7, 1)

str(8) = Mid(Word_in.Text, nums – 8, 1)

str(9) = Mid(Word_in.Text, nums – 9, 1)

str(10) = Mid(Word_in.Text, nums – 10, 1)

str(11) = Mid(Word_in.Text, nums – 11, 1)

str(12) = Mid(Word_in.Text, nums – 12, 1)

str(13) = Mid(Word_in.Text, nums – 13, 1)

str(14) = Mid(Word_in.Text, nums – 14, 1)

str(15) = Mid(Word_in.Text, nums – 15, 1)

str(16) = Mid(Word_in.Text, nums – 16, 1)

str(17) = Mid(Word_in.Text, nums – 17, 1)

str(18) = Mid(Word_in.Text, nums – 18, 1)

str(19) = Mid(Word_in.Text, nums – 19, 1)

Catch ex As Exception

End Try

If Word_in.TextLength = 1 Then

If str(0) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 2 Then

If str(1) = "f" Then

Chr1.Text = "F"

End If

If str(0) = "f" Then

Chr2.Text = "F"

End If

ElseIf Word_in.TextLength = 3 Then

If str(0) = "f" Then

Chr3.Text = "F"

End If

If str(1) = "f" Then

Chr2.Text = "F"

End If

If str(2) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 4 Then

If str(0) = "f" Then

Chr4.Text = "F"

End If

If str(1) = "f" Then

Chr3.Text = "F"

End If

If str(2) = "f" Then

Chr2.Text = "F"

End If

If str(3) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 5 Then

If str(0) = "f" Then

Chr5.Text = "F"

End If

If str(1) = "f" Then

Chr4.Text = "F"

End If

If str(2) = "f" Then

Chr3.Text = "F"

End If

If str(3) = "f" Then

Chr2.Text = "F"

End If

If str(4) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 6 Then

If str(0) = "f" Then

Chr6.Text = "F"

End If

If str(1) = "f" Then

Chr5.Text = "F"

End If

If str(2) = "f" Then

Chr4.Text = "F"

End If

If str(3) = "f" Then

Chr3.Text = "F"

End If

If str(4) = "f" Then

Chr2.Text = "F"

End If

If str(5) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 7 Then

If str(0) = "f" Then

Chr7.Text = "F"

End If

If str(1) = "f" Then

Chr6.Text = "F"

End If

If str(2) = "f" Then

Chr5.Text = "F"

End If

If str(3) = "f" Then

Chr4.Text = "F"

End If

If str(4) = "f" Then

Chr3.Text = "F"

End If

If str(5) = "f" Then

Chr2.Text = "F"

End If

If str(6) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 8 Then

If str(0) = "f" Then

Chr8.Text = "F"

End If

If str(1) = "f" Then

Chr7.Text = "F"

End If

If str(2) = "f" Then

Chr6.Text = "F"

End If

If str(3) = "f" Then

Chr5.Text = "F"

End If

If str(4) = "f" Then

Chr4.Text = "F"

End If

If str(5) = "f" Then

Chr3.Text = "F"

End If

If str(6) = "f" Then

Chr2.Text = "F"

End If

If str(7) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 9 Then

If str(0) = "f" Then

Chr9.Text = "F"

End If

If str(1) = "f" Then

Chr8.Text = "F"

End If

If str(2) = "f" Then

Chr7.Text = "F"

End If

If str(3) = "f" Then

Chr6.Text = "F"

End If

If str(4) = "f" Then

Chr5.Text = "F"

End If

If str(5) = "f" Then

Chr4.Text = "F"

End If

If str(6) = "f" Then

Chr3.Text = "F"

End If

If str(7) = "f" Then

Chr2.Text = "F"

End If

If str(8) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 10 Then

If str(0) = "f" Then

Chr10.Text = "F"

End If

If str(1) = "f" Then

Chr9.Text = "F"

End If

If str(2) = "f" Then

Chr8.Text = "F"

End If

If str(3) = "f" Then

Chr7.Text = "F"

End If

If str(4) = "f" Then

Chr6.Text = "F"

End If

If str(5) = "f" Then

Chr5.Text = "F"

End If

If str(6) = "f" Then

Chr4.Text = "F"

End If

If str(7) = "f" Then

Chr3.Text = "F"

End If

If str(8) = "f" Then

Chr2.Text = "F"

End If

If str(9) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 11 Then

If str(0) = "f" Then

Chr11.Text = "F"

End If

If str(1) = "f" Then

Chr10.Text = "F"

End If

If str(2) = "f" Then

Chr9.Text = "F"

End If

If str(3) = "f" Then

Chr8.Text = "F"

End If

If str(4) = "f" Then

Chr7.Text = "F"

End If

If str(5) = "f" Then

Chr6.Text = "F"

End If

If str(6) = "f" Then

Chr5.Text = "F"

End If

If str(7) = "f" Then

Chr4.Text = "F"

End If

If str(8) = "f" Then

Chr3.Text = "F"

End If

If str(9) = "f" Then

Chr2.Text = "F"

End If

If str(10) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 12 Then

If str(0) = "f" Then

Chr12.Text = "F"

End If

If str(1) = "f" Then

Chr11.Text = "F"

End If

If str(2) = "f" Then

Chr10.Text = "F"

End If

If str(3) = "f" Then

Chr9.Text = "F"

End If

If str(4) = "f" Then

Chr8.Text = "F"

End If

If str(5) = "f" Then

Chr7.Text = "F"

End If

If str(6) = "f" Then

Chr6.Text = "F"

End If

If str(7) = "f" Then

Chr5.Text = "F"

End If

If str(8) = "f" Then

Chr4.Text = "F"

End If

If str(9) = "f" Then

Chr3.Text = "F"

End If

If str(10) = "f" Then

Chr2.Text = "F"

End If

If str(11) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 13 Then

If str(0) = "f" Then

Chr13.Text = "F"

End If

If str(1) = "f" Then

Chr12.Text = "F"

End If

If str(2) = "f" Then

Chr11.Text = "F"

End If

If str(3) = "f" Then

Chr10.Text = "F"

End If

If str(4) = "f" Then

Chr9.Text = "F"

End If

If str(5) = "f" Then

Chr8.Text = "F"

End If

If str(6) = "f" Then

Chr7.Text = "F"

End If

If str(7) = "f" Then

Chr6.Text = "F"

End If

If str(8) = "f" Then

Chr5.Text = "F"

End If

If str(9) = "f" Then

Chr4.Text = "F"

End If

If str(10) = "f" Then

Chr3.Text = "F"

End If

If str(11) = "f" Then

Chr2.Text = "F"

End If

If str(12) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 14 Then

If str(0) = "f" Then

Chr14.Text = "F"

End If

If str(1) = "f" Then

Chr13.Text = "F"

End If

If str(2) = "f" Then

Chr12.Text = "F"

End If

If str(3) = "f" Then

Chr11.Text = "F"

End If

If str(4) = "f" Then

Chr10.Text = "F"

End If

If str(5) = "f" Then

Chr9.Text = "F"

End If

If str(6) = "f" Then

Chr8.Text = "F"

End If

If str(7) = "f" Then

Chr7.Text = "F"

End If

If str(8) = "f" Then

Chr6.Text = "F"

End If

If str(9) = "f" Then

Chr5.Text = "F"

End If

If str(10) = "f" Then

Chr4.Text = "F"

End If

If str(11) = "f" Then

Chr3.Text = "F"

End If

If str(12) = "f" Then

Chr2.Text = "F"

End If

If str(13) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 15 Then

If str(0) = "f" Then

Chr15.Text = "F"

End If

If str(1) = "f" Then

Chr14.Text = "F"

End If

If str(2) = "f" Then

Chr13.Text = "F"

End If

If str(3) = "f" Then

Chr12.Text = "F"

End If

If str(4) = "f" Then

Chr11.Text = "F"

End If

If str(5) = "f" Then

Chr10.Text = "F"

End If

If str(6) = "f" Then

Chr9.Text = "F"

End If

If str(7) = "f" Then

Chr8.Text = "F"

End If

If str(8) = "f" Then

Chr7.Text = "F"

End If

If str(9) = "f" Then

Chr6.Text = "F"

End If

If str(10) = "f" Then

Chr5.Text = "F"

End If

If str(11) = "f" Then

Chr4.Text = "F"

End If

If str(12) = "f" Then

Chr3.Text = "F"

End If

If str(13) = "f" Then

Chr2.Text = "F"

End If

If str(14) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 16 Then

If str(0) = "f" Then

Chr16.Text = "F"

End If

If str(1) = "f" Then

Chr15.Text = "F"

End If

If str(2) = "f" Then

Chr14.Text = "F"

End If

If str(3) = "f" Then

Chr13.Text = "F"

End If

If str(4) = "f" Then

Chr12.Text = "F"

End If

If str(5) = "f" Then

Chr11.Text = "F"

End If

If str(6) = "f" Then

Chr10.Text = "F"

End If

If str(7) = "f" Then

Chr9.Text = "F"

End If

If str(8) = "f" Then

Chr8.Text = "F"

End If

If str(9) = "f" Then

Chr7.Text = "F"

End If

If str(10) = "f" Then

Chr6.Text = "F"

End If

If str(11) = "f" Then

Chr5.Text = "F"

End If

If str(12) = "f" Then

Chr4.Text = "F"

End If

If str(13) = "f" Then

Chr3.Text = "F"

End If

If str(14) = "f" Then

Chr2.Text = "F"

End If

If str(15) = "f" Then

Chr1.Text = "F"

End If

ElseIf Word_in.TextLength = 17 Then

If str(0) = "f" Then

Chr17.Text = "F"

End If

If str(1) = "f" Then

Chr16.Text = "F"

End If

If str(2) = "f" Then

Chr15.Text = "F"

End If

If str(3) = "f" Then

Chr14.Text = "F"

End If

If str(4) = "f" Then

Chr13.Text = "F"

End If

If str(5) = "f" Then

Chr12.Text = "F"

End If

If str(6) = "f" Then

Chr11.Text = "F"

End If

If str(7) = "f" Then

Chr10.Text = "F"

End If

If str(8) = "f" Then

Chr9.Text = "F"

End If

If str(9) = "f" Then

Chr8.Text = "F"

Загрузка...