martes, 8 de febrero de 2011

DATOS DE UN PRODUCTO

DIM A AS Integer
DIM B AS String
A = TextBox4.Text
B = TextBox5.Text
IF TextBox4.Text < TextBox3.Text THEN
Message("REALIZAR ORDEN DE COMPRAS")
ELSE
Message("PERCHA LLENA")
ENDIF
IF TextBox5.Text = ("NACIONAL") THEN
Message("REALIZAR ORDEN DE COMPRAS")
ELSE
Message("PRODUCTO EXTRANJERO ")
ENDIF

CONVERTIR 125 METROS A CENTIMETROS

TextBox1.Text = (125) * (100)

CALCULAR LA SIGIENTE ECUACION

TextBox1.Text = (-5) * (4) ^ 3 - (3) * (4) ^ 2 + 8

EVALUAR LA FUNCION Y= 8X³/5-3X³+6X²-7

TextBox2.Text = (-8) * (TextBox1.Text) ^ (3 / 5) - (3) * (TextBox1.Text) ^ 3 + 6 * (TextBox1.Text) ^ 2 - 7

LOS DATOS MAS INPORTANTES DE UN AUTOMOVIL

Label3.Caption = "1. NUMERO DE MOTOR"
Label4.Caption = "2. FRENOS"
Label5.Caption = "3. TANQUE DE COMBUSTIBLE"
Label6.Caption = "4. NUMERO DE PLACA"
Label7.Caption = "5. PAPELES EN REGLA"
END

RAIZ DE 20

TextBox1.Text = 20 ^ (1 / 2)

calcular las areas utilizando frame

TextBox2.Text = 3.14 * (TextBox1.Text) ^ 2
  TextBox5.Text = (TextBox3.Text * TextBox4.Text) / 2
TextBox8.Text = (TextBox6.Text) ^ 2 + (TextBox7.Text) ^ 2
TextBox10.Text = (TextBox9.Text) ^ 2
END

las operaciones utilizando frames

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

imprimir los numeros del uno al diez

DIM X AS Integer
FOR X = 1 TO 10
ListBox1.Add(X)
NEXT

CUESTIONARIO DE PREGUNTAS

IF RadioButton1.Value = TRUE THEN
TextBox1.Text = ("SI ")
END IF

IF RadioButton2.Value = TRUE THEN
TextBox2.Text = ("ESCUCHAR MUSICA ")
END IF

IF RadioButton3.Value = TRUE THEN
TextBox3.Text = "BAILAR "

END IF
IF RadioButton4.Value = TRUE THEN
TextBox4.Text = "ESTUDIAR"
END IF

IF RadioButton5.Value = TRUE THEN
TextBox5.Text = "SAN MIGUEL"
END IF

IF RadioButton6.Value = TRUE THEN
TextBox6.Text = "080132511 "
END IF

E

1.- Capturar un número cualesquiera e informar si es o no es mayor de 100

DIM A AS Integer
A = TextBox1.Text
IF A > 100 THEN
Message("EL NUMERO ES MAYOR")
ELSE
Message(" EL NUMERO ES MENOR")
END IF

calcular los datos de un producto

DIM A AS Integer
DIM B AS String
A = TextBox4.Text
B = TextBox5.Text
IF TextBox4.Text < TextBox3.Text THEN
Message("REALIZAR ORDEN DE COMPRAS")
ELSE
Message("PERCHA LLENA")
ENDIF
IF TextBox5.Text = ("NACIONAL") THEN
Message("REALIZAR ORDEN DE COMPRAS")
ELSE
Message("PRODUCTO EXTRANJERO ")
ENDIF

DAR CLIK PARA VER LOS DATOS DEL EMPLEADOS

IF CInt(TextBox1.Text) > 500 THEN
Message("CHEQUE SEMANAL")
ELSE
IF CInt(TextBox1.Text) <= 500 THEN
TextBox2.Text = Val(TextBox1.Text) * 0.25
Message(" BONO DEL 25% ")
END IF
END IF
END

CONVERSION DE LIBRAS A KILOGRAMOS

TextBox2.Text = TextBox1.Text * 0.453599

utilizar tres frame

IF CheckBox1.Value = 1 THEN
Message("MASCULINO")
ELSE
IF CheckBox1.Value = 0 THEN
Message("DATO FEMENINO")
END IF
IF CheckBox2.Value = 1 THEN
Message("ES FEMENINO")
ELSE
IF CheckBox2.Value = 0 THEN
Message(" DATOS MASCULINO")
END IF
END IF
END IF
END

PUBLIC SUB Button2_Click()
IF CheckBox3.Value = 0 THEN
Message("SU SUELDO ES DE 100 A 200")
ELSE
IF CheckBox3.Value = 1 THEN
Message("")
END IF
IF CheckBox4.Value = 0 THEN
Message("SU SUELDO ES DE 201 A 300")
ELSE
IF CheckBox4.Value = 1 THEN
Message("")
END IF
IF CheckBox5.Value = 1 THEN
Message("SU SUELDO ES DE 301 A 400")
ELSE
IF CheckBox5.Value = 0 THEN
Message("")
END IF
END IF
END IF
END IF
ENDPUBLIC SUB Button2_Click()
IF CheckBox3.Value = 0 THEN
Message("SU SUELDO ES DE 100 A 200")
ELSE
IF CheckBox3.Value = 1 THEN
Message("")
END IF
IF CheckBox4.Value = 0 THEN
Message("SU SUELDO ES DE 201 A 300")
ELSE
IF CheckBox4.Value = 1 THEN
Message("")
END IF
IF CheckBox5.Value = 1 THEN
Message("SU SUELDO ES DE 301 A 400")
ELSE
IF CheckBox5.Value = 0 THEN
Message("")
END IF
END IF
END IF
END IF
END

3.- Capturar los cinco datos mas importantes de un Empleado, incluyendo el

DIM A AS Integer
A = TextBox6.Text
IF A > 500 THEN
Message("CHEQUE SEMANAL")
ELSE
Message("BONO DE DESPENSA DE 150")
END IF

REALIZAR LA SUMA

TextBox3.TEXT = TextBox1.Text + TextBox2.Text

CONVERTIR UN VALOR DE SUCRES A DOLARES

TextBox2.Text = (TextBox1.Text) / 25000

Mostrar los datos de un empleado si gana mas de 500 mostrar CHEQUE semanal caso contrario un bono del 25%

PUBLIC SUB Button1_Click()DIM A AS Integer
A = TextBox1.Text
IF (A) > 500 THEN
Message("CHEQUE SEMANAL")
ELSE
IF (A) < 500 THEN
Message("BONO DEL 25%")
TextBox2.Text = TextBox1.Text * (0.25)
ENDIF
ENDIF
END

IMPRIMIR LOS NUMEROS DEL 1 AL 200

DIM a AS Integer
FOR a = 1 TO 200
ListBox1.Add(A)
NEXT
END

Utilizando el editor de Menu realizar las siguientes SUMA Y RESTA

para engresar al siguinte formulario
FMain.Hide
Form1.Show

TextBox3.Text = (TextBox1.Text) + (TextBox2.Text)
para segir al otro formulario solo cambiamos form1.show a form2,show para ingresar a la resta
TextBox3.Text = (TextBox1.Text) - (TextBox2.Text)

Evaluar la funciòn Y=3x²-4x+2 para X=2, -5, 8 USAR UN CHECKBOX para cada valor de X y programar cada evento

PUBLIC SUB Button1_Click()IF CheckBox1.Value = TRUE THEN
FMain.Hide
Form1.Show
END IF
IF CheckBox2.Value = TRUE THEN
FMain.Hide
Form2.Show
END IF
IF CheckBox3.Value = TRUE THEN
FMain.Hide
Form3.Show
END IF
END

para desplegar múltiplos de 4 entre 60 y 20 acompañados de su

PUBLIC SUB Button1_Click()DIM A AS Integer
A = 60
DO WHILE A >= 20
ListBox1.Add(A)
A = a - 1
LOOP

END
PUBLIC SUB Button4_Click()
DIM B AS Integer
B = 60
DO WHILE B >= 20
ListBox2.Add((Log)(B))
B = B - 1
LOOP
EN
D

visual basic para desplegar enteros

DIM A AS Integer
A = 50
DO WHILE A <= 80
ListBox1.Add(A)
A = a + 1
LOOP
END

Usar visual basic para desplegar múltiplos de 4 entre 60 y 20 acompañados de su

PUBLIC SUB Button1_Click()
DIM A AS Integer
A = 60
DO WHILE A >= 20
ListBox1.Add(A)
A = a - 1
LOOP
END

Capturar los datos mas importantes de un producto cualesquiera, incluyendo

PUBLIC SUB Button1_Click()DIM A AS String
A = TextBox5.Text
IF A = ("NACIONAL") OR A = ("ECUADOR") THEN
Message("REALIZAR ORDEN DE COMPRAS")
ELSE
Message("PRODUCTO EXTRANJERO")
END IF
END

PUEDE ESCRIBIR LA LETRA "A" "B" Y SE MOSTRARA UN MENSAJE

PUBLIC SUB Button1_Click()SELECT CASE TextBox1.Text
CASE "a", "A"
Message("AGUILA")
CASE "b", "B"
Message("TIGRES")
CASE ELSE
Message("NO HAY")
END SELECT
END

Evaluar la funciòn Y=3x²-4x+2 para X=2, -5, 8 USAR UN CHECKBOX para cada valor de X y programar cada evento clik de cada checkbox con la operaciòn correspondiente y el despliegue del resultado

IF CheckBox1.Value = TRUE THEN
FMain.Hide

Form1.Show
END IF
IF CheckBox2.Value = TRUE THEN
FMain.Hide

Form2.Show
END IF
IF CheckBox3.Value = TRUE THEN
FMain.Hide
Form3.Show

END IF
END

calcular el area de un circulo

PUBLIC SUB Button1_Click()
TextBox2.Text = 3.14*(TextBox1.Text)^2END

calcular el area del cuadrado

PUBLIC SUB Button1_Click()TextBox2.Text = (TextBox1.Text)^2END

calcular el area del rectangulo

TextBox3.Text = (TextBox1.Text)*(TextBox2.Text)END

CALCULAR EL AREA DEL RECTANGULO EN GAMBAS

Button1_Click()TextBox3.Text = (TextBox1.Text)*(TextBox2.Text)END

para convertir la edad a meses.

PUBLIC SUB Button1_Click()
textbox2.text=(textbox1.text)*(12)
END

ejercicio para cambiar el color del formulario

PUBLIC SUB Button1_Click()
FMain.BackColor = (&HFF)

END

PUBLIC SUB Button2_Click()
FMain.BackColor = (&HFF0000)
END

EVALUAR LA FUNCIÓN Y=-5X^3-3X^2+8 cuando X = 4

PUBLIC SUB Button1_Click()
Textbox1.Text = ((-5) * (4) ^ 3) - ((3) * (4) ^ 2) + (8)

END

La gorda Sra. López y sus 8 hijos solo compran una vez al mes su mandado en conocido supermercado, en dicha tienda el kilogramo de frijol cuesta $8.75, el paquete de tortillas cuesta $3.55 y el frasco de café vale $14.25, si solo compran de estos tres productos para su mandado, calcular su gasto total.

PUBLIC SUB Button1_Click()
TextBox1.Text = (8.75 + 3.55 + 14.25)/9

END

.- Capturar los datos más importantes de un producto cualesquiera, incluyendo cantidad, precio, etc. , desplegar una orden de compra, solo si el producto es de origen nacional, en caso contrario no hacer nada

PUBLIC SUB Button1_Click()
IF TextBox4.Text < TextBox3.Text THEN Message("PERCHA LLENA") ELSE Message("REALIZAR ORDEN DE COMPRAS") END IF IF TextBox5.Text = "NACIONAL" OR IF TextBox5.Text = "ECUADOR" THEN Message("REALIZAR ORDEN DE COMPRAS") ELSE Message("PRODUCTO EXTRANJERO") END IF END PUBLIC SUB Button2_Click() Textbox1.text = "" Textbox2.text = "" TextBox3.text = "" Textbox4.text = "" TextBox5.text = "" 

END

programar un calculadora en gambas.

PUBLIC SUB Button1_Click()
Textbox3.text=(Textbox1.text) + (Textbox2.text)

END

PUBLIC SUB
Button2_Click()
Textbox3.text=(Textbox1.text) – (Textbox2.text)

END

PUBLIC SUB
Button3_Click()
Textbox3.text=(Textbox1.text) * (Textbox2.text)

END

PUBLIC
SUB Button4_Click()
Textbox3.text=(Textbox1.text) / (Textbox2.text)

END

PUBLIC SUB
Button5_Click()
Textbox3.text=(Textbox1.text) ^ (Textbox2.text)

END

Transformar 125 metros a centímetros utilizando coman button para calcular

Textbox1.Text = (125) / (100)
END

ingresar un numero y como resultado me de fuera del rango o dentro del ramgo

Dm A as integer
A= TextBOX1.Text
If (A) >= 50 and If (A) <= 60 Then Message ("ANDA ENTRE 50 Y 60") Else Message (" FUERA DEL RANGO 50 Y 60")END PUBLIC SUB Button2_Click() Textbox1.text = "" END PUBLIC SUB Button3_Click() QUIT END

utilizar frame dos egercicios

TextBox3.Text = TextBox1.Text / TextBox2.Text
TextBox6.Text = (TextBox4.Text) ^ 2 * (TextBox5.Text) + (TextBox4.Text) ^ 3 * (TextBox5.Text) ^ 2 - (TextBox4.Text) ^ 4

Se calcula que en promedio hay 4.7 nidos en cada árbol en la UABC, también se calcula que en cada nido existen un promedio de 5.8 pájaros, se pide calcular la cantidad total de nidos y de pájaros en los 227 arboles que existen en la UABC. (No ocupa entradas)

TextBox1.Text = (4.7) * (227)
TextBox2.Text = (5.8) * (TextBox1.Text)

calcular la raiz de un numero

TextBox2.Text = TextBox1.Text ^ (1 / 2)

calcular si es mayo omenor

DIM A AS Integer
A = TextBox1.Text
IF A > 100 THEN
Message("EL NUMERO ES MAYOR")
ELSE
Message(" EL NUMERO ES MENOR")

egercicios de frame

TextBox3.Text = TextBox1.Text ^ TextBox2.Text
TextBox5.Text = 3.14 * (TextBox4.Text) ^ 2
TextBox7.Text = TextBox6.Text * (12)
TextBox9.Text = TextBox8.Text * (365)

lunes, 7 de febrero de 2011

promedio de cuatro notas

TextBox6.TEXT = (TextBox1.TEXT + TextBox2.TEXT + TextBox3.TEXT + TextBox4.TEXT + TextBox5.TEXT) / 5

imprimir el area del triangulo y area del cuadrado

TextBox3.text = (TextBox1.text) * (TextBox2.text) / 2
Message("area del triangulo")
TextBox5.text = (3.14) * (TextBox4.text) ^ 2
Message("area del circulo")
TextBox7.text = (TextBox6.text) * 4
Message("area del cuadrado")
END

imprimir lo numeros del 10 al 100 de diez en diez utilizano el ciclo de repeticion for

DIM A AS Integer
  FOR A = 10 TO 1000 STEP 10
  ListBox1.Add(A)

codificar clik derecho utilizando gambas

MENU.Popup

suma de tres numeros

TextBox4.TEXT = (TextBox1.TEXT + TextBox2.TEXT + TextBox3.TEXT)

IMPRIMIR LOS NUMEROS DEL 15 AL 75 DE 2 EN 2

DIM X AS Integer
FOR X = 15 TO 75 STEP 2
ListBox1.Add(X)
NEXT
END

imprimir 10 veces la palabra pato utilizando do while

DIM x AS Integer
 x = 1
 DO WHILE x <= 10
 ListBox1.Add("pato")
 x = x + 1
 LOOP

con el condicion for imprimir los numeros del 30 al50 y sacar la raiz cubica

DIM A AS Integer
FOR A = 30 TO 50 STEP 2
ListBox1.ADD(A ^ (1 / 3))
NEXT

imprimir los nombres

TextBox1.TEXT = "JONATAN"
TextBox2.TEXT = "APELLIDO"
TextBox3.TEXT = "LA ASUNCION"
TextBox4.TEXT = "2974-136"

ingresar el valor de x para resolver la ecuacion

 TextBox2.TEXT = (TextBox1.Text * 2) + ((TextBox1.Text * 2) ^ 2) ^ (1 / 16)

promedio de cuatro notas

TextBox6.TEXT = (TextBox1.TEXT + TextBox2.TEXT + TextBox3.TEXT + TextBox4.TEXT + TextBox5.TEXT) / 5

multiplicasion de dos numero

textbox3.text=(textbox1.text)*(textbox1.text)

suma de dos numeros

ewtw