-->
EJERCICIO
1
“CALCULAR
EL ÁREA DEL CUADRADO”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox2.Text =
CInt(TextBox1.Text) * (TextBox1.Text)
Label3.Text = "EL
AREA ES:"
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
Label3.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form1.Hide
END
EJERCICIO
2
“CALCULAR
EL ÁREA DE UN CÍRCULO”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox3.text =
(TextBox1.Text) * (TextBox2.Text) * 3.14
Label4.Text = "EL
ÁREA DEL CÍRCULO ES:"
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
Label4.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form2.Hide
END
EJERCICIO
3
“CALCULAR
EL ÁREA DE UN TRIÁNGULO”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox3.Text =
CInt(TextBox1.text * TextBox2.Text / 2)
Label4.Text = "EL
ÁREA DEL TRIÁNGULO ES:"
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
Label4.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form3.Hide
END
EJERCICIO
4
“CALCULAR
LA SIGUIENTE ECUACIÓN Y=X²-2X+5”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox2.Text =
CInt(TextBox1.Text * TextBox1.Text) - CInt(TextBox1.Text * (2)) +
CInt(5)
Label3.Text = "EL
RESULTADO DE Y ES:"
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
Label3.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form4.Hide
END
EJERCICIO
5
“CALCULAR
LA SIGUIENTE ECUACIÓN Y= X³ + 3X²-5X+3”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox2.Text =
CInt(TextBox1.Text) * (TextBox1.Text) * (TextBox1.Text) +
CInt(TextBox1.Text) * (TextBox1.Text) * (3) - CInt(TextBox1.Text) *
(5) + CInt(3)
Label2.Text = "EL
VALOR DE Y ES:"
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
Label2.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form5.Hide
END
EJERCICIO
6
“CONVERTIR
125 METROS A CENTÍMETROS”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text = 125
* 100
END
PUBLIC
SUB Button2_Click()
FMain.Show
Form1.Hide
END
EJERCICIO
7
“HOLA
MUNDO”
'
Gambas class file
PUBLIC
SUB Button1_Click()
label1.Text =
"HOLA MUNDO"
END
PUBLIC
SUB Button2_Click()
Label1.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form2.Hide
END
EJERCICIO
8
“CONVERTIR
LA EDAD DE UNA PERSONA DE AÑOS A MESES”
'
Gambas class file
PUBLIC
SUB Button1_Click()
Label4.Text = "SU
EDAD ES "
TextBox2.Text =
CInt(TextBox1.Text) * 12
Label5.Text =
"MESES"
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
Label4.Text = ""
Label5.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form3.Hide
END
EJERCICIO
9
“SUMA
DE 2 NÚMEROS”
'
Gambas class file
PUBLIC
SUB Button1_Click()
END
PUBLIC
SUB Button2_Click()
Textbox3.Text =
TextBox1.Text + textbox2.Text
Message("LA
SUMA ES CORRECTA")
END
PUBLIC
SUB Button3_Click()
TextBox1.Text = ""
Textbox2.Text = ""
TextBox3.Text = ""
END
PUBLIC
SUB Button4_Click()
FMain.Show
Form4.Hide
END
EJERCICIO
10
“CALCULADORA
BÁSICA”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox3.Text =
TextBox1.Text + TextBox2.Text
Label1.Text = "+"
END
PUBLIC
SUB Button2_Click()
TextBox3.Text =
TextBox1.Text - TextBox2.Text
Label1.Text = "-"
END
PUBLIC
SUB Button3_Click()
TextBox3.Text =
TextBox1.Text * TextBox2.Text
Label1.Text = "*"
END
PUBLIC
SUB Button4_Click()
TextBox3.Text =
TextBox1.Text / TextBox2.Text
Label1.Text = "/"
END
PUBLIC
SUB Button5_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
Label1.Text = ""
END
PUBLIC
SUB Button6_Click()
FMain.Show
Form5.Hide
END
PUBLIC
SUB Button7_Click()
END
EJERCICIO
11
“A=2B+3-4”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox2.Text =
(TextBox1.Text) + (2) + (TextBox1.Text) + (3) - (4)
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form1.Hide
END
EJERCICIO
12
“Y=X+8X+4X-2”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox2.Text =
(TextBox1.Text) + (8) + (TextBox1.Text) + (4) + (TextBox1.Text) - (2)
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form2.Hide
END
EJERCICIO
13
“X=2Y+4X+8-7Y”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox2.Text = (2)
+ (TextBox1.Text) + (4) + (TextBox1.Text) + (8) - (7) -
(TextBox1.Text)
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form3.Hide
END
EJERCICIO
14
“Z=4Y+2X-2+1”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox2.Text =
(TextBox1.Text) + (4) + (TextBox1.Text) + (2) - (2) + (1)
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form4.Hide
END
EJERCICIO
15
“A=2B+5C-4”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox2.Text =
(TextBox1.Text) + (2) + (TextBox1.Text) + (5) - (4)
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form5.Hide
END
EJERCICIO
16
“ÁREA
DE UN CÍRCULO”
'
Gambas class file
PUBLIC
SUB Button1_Click()
DIM PII AS Float
PII = 3.14
TextBox2.Text =
(PII) * (TextBox1.Text) * (TextBox1.Text)
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form1.Hide
END
EJERCICIO
17
“ÁREA
DE UN RECTÁNGULO”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox3.Text =
(TextBox1.Text) * (TextBox2.Text) * (TextBox2.Text)
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Form2.Hide
END
EJERCICIO
18
“CALCULADORA
2”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox3.Text =
TextBox1.Text + TextBox2.Text
END
PUBLIC
SUB Button2_Click()
TextBox6.Text =
TextBox4.Text - TextBox5.Text
END
PUBLIC
SUB Button3_Click()
TextBox9.Text =
TextBox7.Text * TextBox8.Text
END
PUBLIC
SUB Button4_Click()
TextBox12.Text =
TextBox10.Text / TextBox11.Text
END
PUBLIC
SUB Button5_Click()
TextBox3.Text =
TextBox1.Text + TextBox2.Text
TextBox6.Text =
TextBox4.Text - TextBox5.Text
TextBox9.Text =
TextBox7.Text * TextBox8.Text
TextBox12.Text =
TextBox10.Text / TextBox11.Text
END
PUBLIC
SUB Button6_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text =
""
TextBox11.Text =
""
TextBox12.Text =
""
END
PUBLIC
SUB Button7_Click()
FMain.Show
Form3.Hide
END
EJERCICIO
19
“RELATOS”
'
Gambas class file
PUBLIC
SUB TextLabel1_MouseDown()
END
PUBLIC
SUB TextLabel1_DblClick()
TextLabel1.Text =
InputBox("¿ESCRIBE LO QUE SEA?", "TEXTO",
"RELATOS")
END
PUBLIC
SUB Form_Open()
ME.Center
ME.Caption =
"RELATOS"
END
PUBLIC
SUB Button1_Click()
TextLabel1.Text =
""
END
PUBLIC
SUB Button2_Click()
FMain.Show
Form4.Hide
END
EJERCICIO
20
“PIENSA”
'
Gambas class file
PUBLIC
SUB Form_Open()
ME.Center
ME.Caption =
"PIENSA"
END
PUBLIC
SUB TextLabel1_MouseDown()
END
PUBLIC
SUB TextLabel1_DblClick()
TextLabel1.Text =
InputBox("¿ESCRIBE TUS IDEAS", "TEXTO O NÚMEROS",
"PIENSA")
END
PUBLIC
SUB Button1_Click()
TextLabel1.Text =
""
END
PUBLIC
SUB Button2_Click()
FMain.Show
Form5.Hide
END
EJERCICIO
21
“Y=X³-X²+2-3”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text
= InputBox("INGRESE UN DATO", "INGRESO DE VALORES",
"")
END
PUBLIC
SUB Button2_Click()
TextBox2.Text =
((TextBox1.Text) ^ (3)) - ((TextBox1.Text) ^ (2)) + (2) - (3)
END
PUBLIC
SUB Button3_Click()
TextBox1.Text = ""
TextBox2.Text = ""
END
PUBLIC
SUB Button4_Click()
FMain.Show
Ecuacion1.Hide
END
EJERCICIO
22
“Y=X^(3/2)
-7X²+2”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
(ComboBox1.Text) ^ 3 - 7 * (ComboBox1.Text * ComboBox1.Text) + 2
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
ComboBox1.Text =
""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Ecuacion2.Hide
END
PUBLIC
SUB ComboBox1_Click()
END
EJERCICIO
23
“Y=X^(5/2)
-7X⁴+4X³-X²+X-10”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
InputBox("INGRESE UN DATO", "INGRESO DE VALORES",
"")
END
PUBLIC
SUB Button2_Click()
TextBox2.Text =
(TextBox1.Text ^ (5 / 2)) - (7 * (TextBox1.Text) ^ (4)) + (4 *
(TextBox1.Text) ^ (3)) - (TextBox1.Text ^ 2) + (TextBox1.Text) - 10
END
PUBLIC
SUB Button3_Click()
TextBox1.Text = ""
TextBox2.Text = ""
END
PUBLIC
SUB Button4_Click()
FMain.Show
Ecuacion3.Hide
END
EJERCICIO
24
“Y=(X²-3X-5)^(1/3)”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
(ComboBox1.Text) ^ ((2)) - (3) * (ComboBox1.Text) - (5) ^ (1 / 2)
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
ComboBox1.Text =
""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Ecuacion4.Hide
END
EJERCICIO
25
“PASTELERÍA”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
ComboBox1.Text
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
ComboBox1.Text =
""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Pasteleria1.Hide
END
EJERCICIO
26
“NÚMEROS
DEL 1 AL 5”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
ComboBox1.Text
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
ComboBox1.Text =
""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Numerosdel1al5.Hide
END
EJERCICIO
27
“LOS
MESES DEL AÑO”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
ComboBox1.Text
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
ComboBox1.Text =
""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Meses3.Hide
END
EJERCICIO
28
“ALIMENTOS
QUE CONSUMEN LOS ESTUDIANTES”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
ComboBox1.Text
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
ComboBox1.Text =
""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Alimentos4.Hide
END
EJERCICIO
29
“ECUACIÓN
COMBOBOX 5”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
(7) * (ComboBox1.Text) * (ComboBox1.Text) - (ComboBox1.Text) - (4) /
(2)
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
ComboBox1.Text =
""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Ecuacioncombo5.Hide
END
EJERCICIO
30
“ECUACIÓN
COMBOBOX 6”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
(5) * ComboBox1.Text * ComboBox1.Text - (3) * ComboBox1.Text + (5)
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
ComboBox1.Text =
""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Ecuacioncombo6.Hide
END
EJERCICIO
31
“ECUACIÓN
COMBOBOX7”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
InputBox("VALORES NECESARIOS", "NECESIDADES ",
"")
END
PUBLIC
SUB Button2_Click()
TextBox2.Text = (7
* (TextBox1.Text) ^ 2 - 4 * (TextBox1.Text) / 2) ^ (1 / 2)
END
PUBLIC
SUB Button3_Click()
TextBox1.Text = ""
TextBox2.Text = ""
END
PUBLIC
SUB Button4_Click()
FMain.Show
Ecuaciciocombo7.Hide
END
EJERCICIO
32
“MAYOR
O MENOR”
'
Gambas class file
PUBLIC
SUB Button1_Click()
IF
CInt(TextBox1.Text) > 100 THEN
Message.Info("ES
MAYOR QUE 100")
ELSE
Message.Info("NO
ES MAYOR QUE 100")
ENDIF
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
MayorYmenor.Hide
END
EJERCICIO
33
“MÚLTIPLO
DE 4”
'
Gambas class file
PUBLIC
SUB Button1_Click()
IF
CInt(TextBox1.Text) MOD 4 = 0 THEN
Message.Info("ES
MÚLTIPLO DE 4")
ELSE
Message.Info("NO
ES MÚLTIPLO DE 4")
ENDIF
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Multiplode4.Hide
END
EJERCICIO
34 TIENE RELACIÓN CON LOS EJERCIO 35 Y 36
“SALARIO”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox6.Text =
(TextBox1.Text * TextBox2.Text) + (TextBox3.Text * TextBox4.Text) -
TextBox5.Text
END
PUBLIC
SUB Button2_Click()
IF
CInt(TextBox6.Text) > 500 THEN
Message("TIENE
UNOS CHEQUES")
ELSE
Message("USTED
TIENE UN BONO DE DESPENSA")
ENDIF
END
PUBLIC
SUB Button3_Click()
IF
CInt(TextBox6.Text) > 500 THEN
Cheques.Show
Cheques.Text =
TextBox6.Text
Salario.Hide
ELSE
Despensa.Show
Salario.Hide
ENDIF
END
PUBLIC
SUB Button4_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
END
PUBLIC
SUB Button5_Click()
FMain.Show
SALARIO. Hide
END
EJERCICIO
35 TIENE RELACIÓN CON LOS EJERCICIOS 36 Y 34
“DESPENSA”
'
Gambas class file
PUBLIC
SUB Button1_Click()
Salario. Show
Despensa. Hide
END
EJERCICIO
36 TIENE RELACIÓN CON LOS EJERCICIO 35 Y 34
“CHEQUES”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
Cheques.Text
END
PUBLIC
SUB Button2_Click()
Salario. Show
Cheques. Hide
END
EJERCICIO
37 TIENE RELACIÓN CON LOS EJERCICIO 38 Y 39
“CLASES”
'
Gambas class file
PUBLIC
SUB Button1_Click()
DIM
X AS Integer
X
= ((TextBox3.Text + TextBox4.Text + TextBox5.Text) / 3)
IF
CString(ComboBox1.Text) = "MEDICINA" THEN
Boleta. Show
Clases. Hide
Boleta. Text = X
ELSE
Message("OFICIO
DE CITACION A LOS PADRES INVITANDO A UNA PLATICA AMISTOSA")
Oficio. Show
Clases. Hide
ENDIF
END
PUBLIC
SUB Button2_Click()
ComboBox1.Text =
""
TextBox1.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Clases. Hide
END
EJERCICIO
38 TIENE RELACIÓN CON LOS EJERCICIO 37 Y 39
“BOLETA”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
Boleta.Text
TextBox2.Text =
Boleta.Text
TextBox3.Text =
Boleta.Text
Label6.Text =
Boleta.Text
END
PUBLIC
SUB Button2_Click()
Clases.Show
Boleta.Hide
END
EJERCICIO
39 TIENE RELACIÓN CON LOS EJERCICIO 38 Y 37
“OFICIO”
'
Gambas class file
PUBLIC
SUB Button1_Click()
Clases. Show
Oficio. Hide
END
EJERCICIO
40 TIENE RELACIÓN CON EL EJERCICIO 41
“PRODUCTOS”
'
Gambas class file
PUBLIC
SUB Button1_Click()
DIM X AS Integer
X
= TextBox2.Text * TextBox3.Text
IF ComboBox1.Text
= "NACIONAL" THEN
OrdenDecompras.Show
Productos. Hide
Productos. Text =
X
ELSE
Message("NO
ES NACIONAL")
ENDIF
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
ComboBox1.Text =
""
END
PUBLIC
SUB Button3_Click()
FMain.Show
Productos. Hide
END
EJERCICIO
41 TIENE RELACICIÓN CON EL EJERCICIO 40
“ORDEN
DE COMPRAS”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
Productos. Text
END
PUBLIC
SUB Button2_Click()
Productos. Show
OrdenDecompras.
Hide
END
PUBLIC
SUB Button3_Click()
END
..........................................................................................................................
MENÚ
DE OPCIONES
EJERCICIO
42
“ÁREAS”
Realizar
en un formulario FRAME
cada una de las siguientes Áreas; Triángulo,Cuadrado,Círculo y
Rectángulo
PUBLIC
SUB Button1_Click()
TextBox3.Text =
(TextBox1.Text * TextBox2.Text) / 2
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
END
PUBLIC
SUB Button3_Click()
TextBox5.Text =
(TextBox4.Text) ^ 4
END
PUBLIC
SUB Button4_Click()
TextBox4.Text = ""
TextBox5.Text = ""
END
PUBLIC
SUB Button5_Click()
TextBox8.Text
= (TextBox7.Text) * (TextBox6.Text) * 3.14
END
PUBLIC
SUB Button6_Click()
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
END
PUBLIC
SUB Button7_Click()
TextBox11.Text =
(TextBox10.Text) + 2 + (TextBox9.Text) + 2
END
PUBLIC
SUB Button8_Click()
TextBox9.Text = ""
TextBox10.Text =
""
TextBox11.Text =
""
END
PUBLIC
SUB Button9_Click()
TextBox3.Text =
(TextBox1.Text * TextBox2.Text) / 2
TextBox5.Text =
(TextBox4.Text) ^ 4
TextBox7.Text =
(3.14) * (TextBox6.Text) ^ 2
TextBox10.Text =
(TextBox8.Text) ^ 2 * (TextBox9.Text) ^ 2
END
PUBLIC
SUB Button10_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text =
""
END
PUBLIC
SUB Button11_Click()
Form1.Show
Form2.Hide
END
EJERCICIO
43
“ECUACIONES”
Realizar
en un formulario FRAME
cada una de las siguientes Ecuaciones; Y=X³-X²+2-3,
Y=X^(3/2)-7X²+2, Y=X^(5/2)-7X⁴+4X³-X²+X-10, Y=(X²-3X-5)^(1/3)
PUBLIC
SUB Button1_Click()
TextBox1.Text =
InputBox("INGRESE UN DATO", "INGRESO DE VALORES",
"")
END
PUBLIC
SUB Button2_Click()
TextBox2.Text =
((TextBox1.Text) ^ (3)) - ((TextBox1.Text) ^ (2)) + (2) - (3)
END
PUBLIC
SUB Button3_Click()
TextBox1.Text = ""
TextBox2.Text = ""
END
PUBLIC
SUB Button4_Click()
TextBox3.Text =
(ComboBox1.Text) ^ 3 - 7 * (ComboBox1.Text * ComboBox1.Text) + 2
END
PUBLIC
SUB Button5_Click()
TextBox3.Text = ""
ComboBox1.Text =
""
END
PUBLIC
SUB Button6_Click()
TextBox4.Text =
InputBox("INGRESE UN DATO", "INGRESO DE VALORES",
"")
END
PUBLIC
SUB Button7_Click()
TextBox5.Text =
(TextBox4.Text ^ (5 / 2)) - (7 * (TextBox4.Text) ^ (4)) + (4 *
(TextBox4.Text) ^ (3)) - (TextBox4.Text ^ 2) + (TextBox4.Text) - 10
END
PUBLIC
SUB Button8_Click()
TextBox4.Text = ""
TextBox5.Text = ""
END
PUBLIC
SUB Button9_Click()
TextBox6.Text =
(ComboBox2.Text) ^ ((2)) - (3) * (ComboBox2.Text) - (5) ^ (1 / 2)
END
PUBLIC
SUB Button10_Click()
TextBox6.Text = ""
ComboBox2.Text =
""
END
PUBLIC
SUB Button11_Click()
TextBox2.Text =
((TextBox1.Text) ^ (3)) - ((TextBox1.Text) ^ (2)) + (2) - (3)
TextBox3.Text =
(ComboBox1.Text) ^ 3 - 7 * (ComboBox1.Text * ComboBox1.Text) + 2
TextBox5.Text =
(TextBox4.Text ^ (5 / 2)) - (7 * (TextBox4.Text) ^ (4)) + (4 *
(TextBox4.Text) ^ (3)) - (TextBox4.Text ^ 2) + (TextBox4.Text) - 10
TextBox6.Text =
(ComboBox2.Text) ^ ((2)) - (3) * (ComboBox2.Text) - (5) ^ (1 / 2)
END
PUBLIC
SUB Button12_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
ComboBox1.Text =
""
ComboBox2.Text =
""
END
PUBLIC
SUB Button13_Click()
Form1.Show
Form3.Hide
END
EJERCICIO
44 TIENE RELACIÓN CON LOS EJERCICIO 45 Y 46
“CALIFICACIONES”
“CLASES”
'
Gambas class file
PUBLIC
SUB Button1_Click()
DIM
D, Y, Z, C AS Integer
DIM
A, B AS String
Y
= TextBox3.Text
Z
= TextBox4.Text
C
= TextBox5.Text
A
= TextBox1.Text
IF
CStr(ComboBox1.Text) = "MEDICINA" THEN
D
= ((Y + Z + C) / 3)
Boleta.Label6.Text
= Y
Boleta.TextBox1.Text
= Z
Boleta.TextBox2.Text
= C
Boleta.Show
Clases.Hide
ELSE
Message("CITACION
A LOS PADRES A UNA PLATICA")
Oficio.Show
Clases.Hide
ENDIF
END
PUBLIC
SUB Button2_Click()
ComboBox1.Text =
""
TextBox1.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
END
PUBLIC
SUB Button3_Click()
Form1.Hide
Clases.Show
END
EJERCICIO
45 TIENE RELACIÓN CON LOS EJERCICIO 44 Y 46
“BOLETA”
'
Gambas class file
PUBLIC
SUB Button1_Click()
TextBox1.Text =
Boleta.Text
TextBox2.Text =
Boleta.Text
TextBox3.Text =
Boleta.Text
Label6.Text =
Boleta.Text
END
PUBLIC
SUB Button2_Click()
Clases.Show
Boleta.Hide
END
EJERCICIO
46 TIENE RELACIÓN CON LOS EJERCICIO 44 Y 45
“OFICIO”
'
Gambas class file
PUBLIC
SUB Button1_Click()
Clases.Show
Oficio.Hide
END
MENÚ
DE OPCIONES
EJERCICIO
47
“Capture
un numero cualesquiera e informe si es o no es mayor de 50 y múltiplo
de tres. Escribir un mensaje de respuesta de manera muy clara y esto
resuelve el problema”
'
Gambas class file
PUBLIC
SUB Button1_Click()
DIM A AS Integer
A
= TextBox1.Text
IF A > 50 THEN
Message("ES
MAYOR QUE 50")
IF A MOD 3 = 0
THEN
Message("ES
MÚLTIPLO DE 3")
ELSE
Message("NO
ES MÚLTIPLO DE 3")
ENDIF
ELSE
IF A MOD 3 = 0
THEN
Message("ES
MÚLTIPLO DE 3")
ELSE
Message("NO
ES MAYOR DE 50 Y NO ES MÚLTIPLO DE 3")
ENDIF
ENDIF
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
END
PUBLIC
SUB Button3_Click()
MenuS.Show
Numero.Hide
END
EJERCICIO
48
“Construir
un programa que indique si un numero es un par positivo ”
'
Gambas class file
PUBLIC
SUB Button1_Click()
DIM A AS Integer
A
= TextBox1.Text
IF
A > 0 THEN
IF A MOD 2 = 0 THEN
Message("ES
MÚLTIPLO DE 2 POSITIVO")
ELSE
Message("NO
ES MÚLTIPLO DE 2 POSTIVO")
ENDIF
ELSE
Message("INGRESE
UN NÚMERO POSITIVO")
ENDIF
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
END
PUBLIC
SUB Button3_Click()
MenuS.Show
ParPositivo.Hide
END
EJERCICIO
49 TIENE RELACIÓN CON EL EJERCICIO 50
“Capturar
datos de un producto incluyendo su cantidad en existencia, un panel
que despliegue una orden de compra si la cantidad en existencia del
producto es menor que el punto de reorden, o si el origen del
producto es nacional. ”
'
Gambas class file
PUBLIC
SUB Button1_Click()
DIM
A, B, C, F, G, X, Y, Z AS Integer
DIM D, E AS String
A = TextBox1.Text
B = TextBox5.Text
Z = TextBox4.Text
X = TextBox3.Text
Y = X * Z
C = TextBox1.Text
D = TextBox2.Text
E = ComboBox1.Text
F = TextBox4.Text
G = TextBox5.Text
IF
A < B THEN
Orden.TextLabel1.Text
= C
Orden.TextLabel2.Text
= D
Orden.TextLabel3.Text
= E
Orden.TextLabel4.Text
= F
Orden.TextLabel5.Text
= G
Orden.TextLabel6.Text
= Y
Producto. Hide
Orden. Show
ELSE
IF
ComboBox1.Text = "NACIONAL" THEN
Orden.TextLabel1.Text
= C
Orden.TextLabel2.Text
= D
Orden.TextLabel3.Text
= E
Orden.TextLabel4.Text
= F
Orden.TextLabel5.Text
= G
Orden.TextLabel6.Text
= Y
Orden.TextLabel6.Text
= Y
Producto. Hide
Orden. Show
ELSE
IF
A < B THEN
Orden.TextLabel1.Text
= C
Orden.TextLabel2.Text
= D
Orden.TextLabel3.Text
= E
Orden.TextLabel4.Text
= F
Orden.TextLabel5.Text
= G
Orden.TextLabel6.Text
= Y
Orden.TextLabel6.Text
= Y
Producto. Hide
Orden. Show
ELSE
IF
A < B THEN
Orden.TextLabel1.Text
= C
Orden.TextLabel2.Text
= D
Orden.TextLabel3.Text
= E
Orden.TextLabel4.Text
= F
Orden.TextLabel5.Text
= G
Orden.TextLabel6.Text
= Y
orden.TextLabel6.Text
= Y
Producto. Hide
Orden. Show
ELSE
Message("NO
ES NACIONAL Y NO HAY MAS EN REORDEN")
ENDIF
ENDIF
ENDIF
ENDIF
END
PUBLIC
SUB Button2_Click()
TextBox1.Text
= ""
TextBox2.Text
= ""
TextBox3.Text
= ""
TextBox4.Text
= ""
TextBox5.Text
= ""
ComboBox1.Text
= ""
END
PUBLIC
SUB Button3_Click()
MenuS.Show
Producto. Hide
END
EJERCICIO
50 TIENE RELACIÓN CON EL EJERCICIO 49
“DATOS
DEL PRODUCTO”
'
Gambas class file
PUBLIC
SUB Button1_Click()
Producto. Show
Orden. Hide
END
PUBLIC
SUB Label1_MouseDown()
END
EJERCICIO
51 TIENE RELACIÓN CON LOS EJERCICIO 52 Y 53
“Capture
los datos de un empleado, desplegar en una ventana su cheque semanal
si gana mas de $500.00 si esta en el departamento de producción,
caso contrario desplegarle en otra ventana un bono de despensa del
25% de su sueldo semanal ”
'
Gambas class file
PUBLIC
SUB Button1_Click()
DIM
X, Y AS Integer
DIM
Z, A AS String
Z = TextBox1.Text
Y = TextBox2.Text
A = ComboBox1.Text
X = Y * 1 / 4
IF
Y > 500 THEN
IF
A = "PRODUCCION" THEN
Cheque. Show
Sueldo. Hide
Cheque.TextLabel1.Text
= Z
Cheque.TextLabel2.Text
= Y
ELSE
Message("USTED
TIENE UN BONO DE DESPENSA DE")
Bono. Show
Sueldo. Hide
Bono.Label2.Text =
X
ENDIF
ELSE
Message("USTED
TIENE UN BONO DE DESPENSA DE")
Bono. Show
Sueldo. Hide
Bono.Label2.Text =
X
ENDIF
END
PUBLIC
SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
ComboBox1.Text =
""
END
PUBLIC
SUB Button3_Click()
MenuS.Show
Sueldo. Hide
END
EJERCICIO
51 TIENE RELACIÓN CON LOS EJERCICIO 52 Y 53
“
CHEQUE”
'
Gambas class file
PUBLIC
SUB Button1_Click()
Sueldo. Show
Cheque. Hide
END
EJERCICIO
52 TIENE RELACIÓN CON LOS EJERCICIO 51 Y 52
“
BONO DE
DESPENSA”
'
Gambas class file
PUBLIC
SUB Button1_Click()
Sueldo. Show
Bono. Hide
END
EJERCICIO
53
“
CHECKBOX”
'
Gambas class file
PUBLIC
SUB _new()
END
PUBLIC
SUB Form_Open()
END
PUBLIC
SUB Button1_Click()
IF CheckBox1.Value
<> 0 THEN
Message("ES
HOMBRE")
ENDIF
IF CheckBox2.Value
<> 0 THEN
Message("ES
MUJER")
ENDIF
IF CheckBox3.Value
<> 0 THEN
Message("ES
ALTERNATIVO")
ENDIF
IF CheckBox1.Value
= 0
IF CheckBox2.Value
= 0
IF CheckBox3.Value
= 0
IF CheckBox1.Value
= 0 THEN
Message("NO
INGRESADO")
ENDIF
ENDIF
ENDIF
ENDIF
END
PUBLIC
SUB Button2_Click()
CheckBox1.Value =
0
CheckBox2.Value =
0
CheckBox3.Value =
0
END
PUBLIC
SUB Button3_Click()
QUIT
END
PUBLIC
SUB MenuCirculo_Click()
FMain.Hide
Form1.Show
END
PUBLIC
SUB Button4_Click()
IF CheckBox4.Value
<> 0 THEN
Message("EL
SUELDO DEL HOMBRE ES DE $1500")
ENDIF
IF CheckBox5.Value
<> 0 THEN
Message("EL
SUELDO DE LA MUJER ES DE $1000")
ENDIF
IF CheckBox6.Value
<> 0 THEN
Message("TIENEN
BONO ADICIONAL DE $300 CADA UNO")
ENDIF
IF CheckBox4.Value
= 0 THEN
IF CheckBox5.Value
= 0 THEN
IF CheckBox6.Value
= 0 THEN
Message("NO
TRABAJARON VAGOS Y NO RECIBIRÁN SUELDO NO BONO EXTRA?")
ENDIF
ENDIF
ENDIF
END
PUBLIC
SUB Button5_Click()
CheckBox4.Value =
0
CheckBox5.Value =
0
CheckBox6.Value =
0
END
PUBLIC
SUB Button6_Click()
QUIT
END
PUBLIC
SUB MenuSalir_Click()
FMain.Close
END