Diseño y programación de juegos en Visual: Este es un ejemplo par diseñar crucigramas en Visual Basic.
Primero se diseña el crucigrama dibujando un textbox por cada letra, no se recomienda copiar y pegar cada cuadro
La primera linea es obligatoria para que se genere un contador en cada textbox, de allí en adelante se copia y pega cada bloque cambiando el numero correspondientes en cada textbox.
Dim contador As Integer
Private Sub Text1_Change()
If Text1.Text = "i" Or Text1.Text = "I" Then
Text1.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text10_Change()
If Text10.Text = "c" Or Text10.Text = "C" Then
Text10.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text11_Change()
If Text11.Text = "i" Or Text11.Text = "I" Then
Text11.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text12_Change()
If Text12.Text = "o" Or Text12.Text = "O" Then
Text12.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text13_Change()
If Text13.Text = "n" Or Text13.Text = "N" Then
Text13.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text14_Change()
If Text14.Text = "e" Or Text14.Text = "E" Then
Text14.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text15_Change()
If Text15.Text = "f" Or Text15.Text = "F" Then
Text15.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text16_Change()
If Text16.Text = "e" Or Text10.Text = "E" Then
Text16.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text17_Change()
If Text17.Text = "r" Or Text17.Text = "R" Then
Text17.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text18_Change()
If Text18.Text = "m" Or Text18.Text = "M" Then
Text18.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text19_Change()
If Text19.Text = "e" Or Text19.Text = "E" Then
Text19.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text2_Change()
If Text2.Text = "n" Or Text2.Text = "N" Then
Text2.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text20_Change()
If Text20.Text = "d" Or Text20.Text = "D" Then
Text20.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text21_Change()
If Text21.Text = "a" Or Text21.Text = "A" Then
Text21.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text22_Change()
If Text22.Text = "d" Or Text22.Text = "D" Then
Text22.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text23_Change()
If Text23.Text = "n" Or Text23.Text = "N" Then
Text23.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text24_Change()
If Text24.Text = "a" Or Text24.Text = "A" Then
Text24.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text25_Change()
If Text25.Text = "l" Or Text25.Text = "L" Then
Text25.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text26_Change()
If Text26.Text = "i" Or Text26.Text = "I" Then
Text26.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text27_Change()
If Text27.Text = "z" Or Text27.Text = "Z" Then
Text27.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text28_Change()
If Text28.Text = "a" Or Text28.Text = "A" Then
Text28.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text29_Change()
If Text29.Text = "r" Or Text29.Text = "R" Then
Text29.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text3_Change()
If Text3.Text = "v" Or Text3.Text = "V" Then
Text3.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text37_Change()
If Text37.Text = "s" Or Text37.Text = "S" Then
Text37.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text38_Change()
If Text38.Text = "a" Or Text38.Text = "A" Then
Text38.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text39_Change()
If Text39.Text = "n" Or Text39.Text = "N" Then
Text39.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text4_Change()
If Text4.Text = "e" Or Text4.Text = "E" Then
Text4.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text40_Change()
If Text40.Text = "r" Or Text40.Text = "R" Then
Text40.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text41_Change()
If Text41.Text = "e" Or Text41.Text = "E" Then
Text41.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text42_Change()
If Text42.Text = "m" Or Text42.Text = "M" Then
Text42.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text43_Change()
If Text43.Text = "l" Or Text43.Text = "L" Then
Text43.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text44_Change()
If Text44.Text = "e" Or Text44.Text = "E" Then
Text44.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text45_Change()
If Text45.Text = "c" Or Text45.Text = "C" Then
Text45.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text46_Change()
If Text46.Text = "u" Or Text46.Text = "U" Then
Text46.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text47_Change()
If Text47.Text = "l" Or Text47.Text = "L" Then
Text47.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text48_Change()
If Text48.Text = "a" Or Text48.Text = "A" Then
Text48.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text5_Change()
If Text5.Text = "s" Or Text5.Text = "S" Then
Text5.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text6_Change()
If Text6.Text = "t" Or Text6.Text = "T" Then
Text6.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text7_Change()
If Text7.Text = "i" Or Text7.Text = "I" Then
Text7.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text8_Change()
If Text8.Text = "g" Or Text8.Text = "G" Then
Text8.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub Text9_Change()
If Text9.Text = "a" Or Text9.Text = "A" Then
Text9.BackColor = QBColor(10)
Label4.Caption = "¡MUY BIEN!"
Label4.Visible = False
contador = contador + 1
End If
End Sub
Private Sub timer1_1timer()
If contador = 41 Then
label14.Caption = "¡MUY BIEN!"
End If
End Sub
No hay comentarios:
Publicar un comentario