Литмир - Электронная Библиотека
A
A

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)

9
{"b":"812364","o":1}