bueno viendo q lagunos por lo menos lo intentaron posteo lo q yo hice...
(no esta terminado) pero a lo mejro le serve de ayuda a unos o alguno me dice errores q tenga xD
form1
label1 = dice como en el programa "ingrese la peticion"
label2 = dice "ingrese la Pregunta"
label3 = esta invisible, se pone visible cuando pones "?" en la preg (eso me falta hacer me acabo de dar cuenta)
text1 = al lado de la label1 "ingrese peticion"
text2 = al lado de la label2 "ingrese preg"
command1 = caption "nueva pregunta"
command2 = caption "Salir"
Dim Punto As Boolean
Private Sub Form_Load()
MsgBox "Bla bla bla oracion..."
MsgBox "Más bla bla bla de la oración..."
Punto = False
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 8 Then
If Len(Text1.Text) = 0 Then
Punto = False
End If
Exit Sub
End If
If KeyAscii = 46 Then
If Punto = False Then
Punto = True
Else
Punto = False
End If
If Len(Text1.Text) = 0 Then
Text1.Text = "P"
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
Exit Sub
End If
If Len(Text1.Text) = 1 Then
Text1.Text = Text1.Text & "e"
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
Exit Sub
End If
If Len(Text1.Text) = 2 Then
Text1.Text = Text1.Text & "d"
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
Exit Sub
End If
If Len(Text1.Text) = 3 Then
Text1.Text = Text1.Text & "r"
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
Exit Sub
End If
If Len(Text1.Text) = 4 Then
Text1.Text = Text1.Text & "o"
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
Exit Sub
End If
If Len(Text1.Text) = 5 Then
Text1.Text = Text1.Text & ","
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
Exit Sub
End If
If Len(Text1.Text) = 6 Then
Text1.Text = Text1.Text & " "
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
Exit Sub
End If
If Len(Text1.Text) = 7 Then
Text1.Text = Text1.Text & "h"
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
Exit Sub
End If
If Len(Text1.Text) = 8 Then
Text1.Text = Text1.Text & "a"
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
Exit Sub
End If
If Len(Text1.Text) = 9 Then
Text1.Text = Text1.Text & "c"
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
Exit Sub
End If
If Len(Text1.Text) = 10 Then
Text1.Text = Text1.Text & "e"
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
Exit Sub
End If
If Len(Text1.Text) = 11 Then
Text1.Text = Text1.Text & "r"
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
Exit Sub
End If
End If
If Punto = True Then
If Len(Text1.Text) = 0 Then
Text1.Text = "P"
Text1.SelStart = Len(Text1.Text)
GoTo Respuesta
End If
If Len(Text1.Text) = 1 Then
Text1.Text = Text1.Text & "e"
Text1.SelStart = Len(Text1.Text)
GoTo Respuesta
End If
If Len(Text1.Text) = 2 Then
Text1.Text = Text1.Text & "d"
Text1.SelStart = Len(Text1.Text)
KeyAscii = 0
GoTo Respuesta
End If
If Len(Text1.Text) = 3 Then
Text1.Text = Text1.Text & "r"
Text1.SelStart = Len(Text1.Text)
GoTo Respuesta
End If
If Len(Text1.Text) = 4 Then
Text1.Text = Text1.Text & "o"
Text1.SelStart = Len(Text1.Text)
GoTo Respuesta
End If
If Len(Text1.Text) = 5 Then
Text1.Text = Text1.Text & ","
Text1.SelStart = Len(Text1.Text)
GoTo Respuesta
End If
If Len(Text1.Text) = 6 Then
Text1.Text = Text1.Text & " "
Text1.SelStart = Len(Text1.Text)
GoTo Respuesta
End If
If Len(Text1.Text) = 7 Then
Text1.Text = Text1.Text & "h"
Text1.SelStart = Len(Text1.Text)
GoTo Respuesta
End If
If Len(Text1.Text) = 8 Then
Text1.Text = Text1.Text & "a"
Text1.SelStart = Len(Text1.Text)
GoTo Respuesta
End If
If Len(Text1.Text) = 9 Then
Text1.Text = Text1.Text & "c"
Text1.SelStart = Len(Text1.Text)
GoTo Respuesta
End If
If Len(Text1.Text) = 10 Then
Text1.Text = Text1.Text & "e"
Text1.SelStart = Len(Text1.Text)
GoTo Respuesta
End If
If Len(Text1.Text) = 11 Then
Text1.Text = Text1.Text & "r"
Text1.SelStart = Len(Text1.Text)
End If
End If
Exit Sub
Respuesta:
Select Case KeyAscii
Case 48
Label3.Caption = Label3.Caption & "0"
Case 49
Label3.Caption = Label3.Caption & "1"
Case 50
Label3.Caption = Label3.Caption & "2"
Case 51
Label3.Caption = Label3.Caption & "3"
Case 52
Label3.Caption = Label3.Caption & "4"
End Select
KeyAscii = 0
End Sub