Professional Documents
Culture Documents
CÓDIGO
Botón Jugar
Evento_clic
PUBLIC a,s,err,x,hint
a=0
s=0
err = 0
ELSE
If err = 0 Then
If ALLTRIM(thisform.TextBox1.value) <> ALLTRIM(thisform.txtword.value)
Then
x = ALLTRIM(thisform.txtword.value)
hint = ALLTRIM(thisform.TextBox1.value)
thisform.txtword.Value = " "
thisform.TextBox1.value = " "
DO FORM ahorcado
thisform.Release
ELSE
MESSAGEBOX("La sugerencia no puede ser la misma que la palabra
dada")
EndIf
ENDIF
ENDIF
endif
ELSE
MESSAGEBOX("Error",48)
EndIf
Ejecución
Formulario Ahorcado
Código
INIT
s=0
chance = 8
THISFORM.label2.Caption = hint
THISFORM.label4.Value = chance
word =x
wordlength = LEN(x)
For s = 1 To wordlength
cadmostrar = cadmostrar+"-"
ENDFOR
thisform.TextBox1.value = cadmostrar
BOTONES A-Z
i=0
lettercount = 0
For i = 1 To LEN(word)
lettercount = lettercount + 1
cadmostrar = stuff(cadmostrar,i,1,thisform.A.caption)
EndIf
ENDFOR
thisform.textBox1.Value = cadmostrar
chance = chance - 1
If chance = 0 Then
thisform.A.Enabled = .f.
thisform.B.Enabled = .f.
thisform.C.Enabled = .f.
thisform.D.Enabled = .f.
thisform.E.Enabled = .f.
thisform.F.Enabled = .f.
thisform.G.Enabled = .f.
thisform.H.Enabled = .f.
thisform.I.Enabled = .f.
thisform.J.Enabled = .f.
thisform.K.Enabled = .f.
thisform.L.Enabled = .f.
thisform.M.Enabled = .f.
thisform.N.Enabled = .f.
thisform.O.Enabled = .f.
thisform.P.Enabled = .f.
thisform.Q.Enabled = .f.
thisform.R.Enabled = .f.
thisform.S.Enabled = .f.
thisform.T.Enabled = .f.
thisform.U.Enabled = .f.
thisform.V.Enabled = .f.
thisform.W.Enabled = .f.
thisform.X.Enabled = .f.
thisform.Y.Enabled = .f.
thisform.Z.Enabled = .f.
* GroupBox1.Enabled = False
EndIf
EndIf
thisform.A.Enabled = .f.
thisform.Label4.Value = chance
thisform.Label4.valid()
EndIf
Proyecto: Ahorcado
INTEGRANTES:
YULISSA RAMIREZ DEL ROSARIO
ERICKA TOMALA PEREZ
CURSO: 2 INFORMATICA A