SlideShare uma empresa Scribd logo
1 de 25
Protector de pantalla
PUBLIC C AS Integer
PUBLIC CO AS Integer
PUBLIC CV AS Integer

PUBLIC SUB _new()

END

PUBLIC SUB Form_Open()

END

PUBLIC SUB Timer1_Timer()

C = Int(Rnd() * 500)
CO = Int(Rnd() * 500)
CV = Int(Rnd() * 20)
Draw.Begin(area1)
Draw.FillColor = Color.RGB((250 + C), (3 + CO), (C + CO))
Draw.FillStyle = Fill.Solid
Draw.Circle(C, CO, CV)
Draw.End
END

PUBLIC SUB Button1_Click()

   IF Button1.Text = "Iniciar" THEN   
  Timer1.Enabled = TRUE
  Button1.Caption = "Parar"
  ELSE 
   Button1.Caption = "Iniciar"
   Timer1.Enabled = FALSE
   ENDIF 

END

PUBLIC SUB Button2_Click()


END
Calculadora
PUBLIC BAN AS Integer
PUBLIC OP1 AS Single
PUBLIC OP2 AS Single



PUBLIC SUB _new()

END

PUBLIC SUB Form_Open()

END

PUBLIC SUB Button1_Click()
 BAN = 1
 IF TextBox1.Text <> 0 THEN 
 OP1 = TextBox1.Text
 ELSE 
 OP1 = 0
 ENDIF 
TextBox1.Clear
END

PUBLIC SUB Button18_Click()

  ME.Close

END

PUBLIC SUB Button8_Click()
  TextBox1.Text = ""

END

PUBLIC SUB Button6_Click()

  TextBox1.Text = TextBox1.Text & "0"

END

PUBLIC SUB Button7_Click()

  TextBox1.Text = TextBox1.Text & "."

END

PUBLIC SUB Button9_Click()

  TextBox1.Text = TextBox1.Text & "1"

END

PUBLIC SUB Button10_Click()

  TextBox1.Text = TextBox1.Text & "2"

END

PUBLIC SUB Button11_Click()

  TextBox1.Text = TextBox1.Text & "3"

END

PUBLIC SUB Button12_Click()

  TextBox1.Text = TextBox1.Text & "4"

END

PUBLIC SUB Button13_Click()

  TextBox1.Text = TextBox1.Text & "5"

END

PUBLIC SUB Button14_Click()

  TextBox1.Text = TextBox1.Text & "6"
END

PUBLIC SUB Button15_Click()

  TextBox1.Text = TextBox1.Text & "7"

END

PUBLIC SUB Button16_Click()

  TextBox1.Text = TextBox1.Text & "8"

END

PUBLIC SUB Button17_Click()

  TextBox1.Text = TextBox1.Text & "9"

END

PUBLIC SUB TextBox1_KeyPress()

END

PUBLIC SUB Button2_Click()

   BAN = 2
 IF TextBox1.Text <> 0 THEN 
 OP1 = TextBox1.Text
 ELSE 
 OP1 = 0
 ENDIF 
TextBox1.Clear

END

PUBLIC SUB Button3_Click()

   BAN = 3
 IF TextBox1.Text <> 0 THEN 
 OP1 = TextBox1.Text
 ELSE 
 OP1 = 0
 ENDIF 
TextBox1.Clear

END

PUBLIC SUB Button4_Click()
   BAN = 4
 IF TextBox1.Text <> 0 THEN 
 OP1 = TextBox1.Text
 ELSE 
 OP1 = 0
 ENDIF 
TextBox1.Clear

END

PUBLIC SUB Button5_Click()

  IF TextBox1.Text <> 0 THEN 
  OP2 = Val(TextBox1.Text)
  ELSE 
  OP2 = 0
ENDIF 
TextBox1.Text = operacion(OP1, OP2, BAN)
END

PUBLIC FUNCTION operacion(v1 AS Float, v2 AS Float, opera AS Integer) AS Float

DIM re AS Single
DIM y2, x, y, z, x1, z2, y1 AS Integer
DIM f, i AS Integer

  SELECT CASE opera
  CASE 1
      re = v1 + v2
      z2 = 1
  CASE 2
      re = v1 ­ v2
      z2 = 1
  CASE 3
      re = v1 * v2
      z2 = 1
  CASE 4
      re = v1 / v2
      z2 = 1
  CASE 5
      re = (v1 * v2) / 100
      z2 = 1
  CASE 6
      re = v1 * v1
      z2 = 1
  CASE 7
      re = v1 * v1 * v1
      z2 = 1
  CASE 8
      re = 1 / v1
      z2 = 1
  CASE 9
      f = 1
    FOR i = 1 TO v1 
    f = f * i
  
    NEXT 
     re = f
     z2 = 1 
  CASE 10
     re = Rnd(v1)
      z2 = 1
           
  END SELECT 
  IF z2 = 1 THEN 
  RETURN re
  ELSE 
  RETURN y1
  ENDIF 
  END
  
PUBLIC SUB Button19_Click()
 BAN = 5
 IF TextBox1.Text <> 0 THEN 
 OP1 = TextBox1.Text
 ELSE 
 OP1 = 0
 ENDIF 
TextBox1.Clear
   

END

PUBLIC SUB Button20_Click()

   BAN = 6
 IF TextBox1.Text <> 0 THEN 
 OP1 = TextBox1.Text
 ELSE 
 OP1 = 0
 ENDIF 
TextBox1.Text = OP1

END

PUBLIC SUB Button21_Click()
'numero binario
DIM valor, x1, x2, i AS Integer
DIM cadena, cadena2 AS String
  valor = TextBox1.Text
  
  WHILE valor > 0
      x1 = valor MOD 2
      x2 = Int(valor / 2)
      cadena = cadena & Str(x1)
      valor = x2
  WEND     
  
  FOR i = Len(cadena) TO 1 STEP ­1
      cadena2 = cadena2 & (Mid(cadena, i, 1))
   NEXT    
  TextBox1.Text = cadena2 

END

PUBLIC SUB Button22_Click()

  'Calculo a octal de un número decimal
DIM valor, x1, x2, i AS Integer
DIM cadena, cadena2 AS String
' IF visor.Text <> 0 THEN  
   valor = TextBox1.Text
    WHILE valor > 0
      x1 = valor MOD 8
      x2 = Int(valor / 8)
      cadena = cadena & Str(x1)
      valor = x2
  WEND     
  
  FOR i = Len(cadena) TO 1 STEP ­1
      cadena2 = cadena2 & (Mid(cadena, i, 1))
   NEXT    
  TextBox1.Text = cadena2 

END

PUBLIC SUB Button23_Click()

 'Calculo a hexadecimal de un número decimal
DIM valor, x1, x2, i AS Integer
DIM cadena, cadena2 AS String
  valor = TextBox1.Text
  
  WHILE valor > 0
      x1 = valor MOD 16
      x2 = Int(valor / 16)
      IF x1 = 10 THEN
      cadena = cadena & "A"
      ELSE 
      IF x1 = 11 THEN
      cadena = cadena & "B"
      ELSE
      IF x1 = 12 THEN
      cadena = cadena & "C"
      ELSE
      IF x1 = 13 THEN
      cadena = cadena & "D"
      ELSE
      IF x1 = 14 THEN
      cadena = cadena & "E"
      ELSE
      IF x1 = 15 THEN
      cadena = cadena & "F"
      ELSE
      cadena = cadena & Str(x1)
      ENDIF
      ENDIF
      ENDIF
      ENDIF
      ENDIF
      ENDIF 
      valor = x2
  WEND     
  
  FOR i = Len(cadena) TO 1 STEP ­1
      cadena2 = cadena2 & (Mid(cadena, i, 1))
   NEXT    
  TextBox1.Text = cadena2  

END

PUBLIC SUB Button24_Click()

   BAN = 7
 IF TextBox1.Text <> 0 THEN 
 OP1 = TextBox1.Text
 ELSE 
 OP1 = 0
 ENDIF 
TextBox1.Text = OP1

END

PUBLIC SUB Button25_Click()

   BAN = 8
 IF TextBox1.Text <> 0 THEN 
 OP1 = TextBox1.Text
 ELSE 
 OP1 = 0
 ENDIF 
TextBox1.Text = OP1

END

PUBLIC SUB Button26_Click()

   BAN = 9
 IF TextBox1.Text <> 0 THEN 
 OP1 = TextBox1.Text
 ELSE 
 OP1 = 0
 ENDIF 
TextBox1.Text = OP1

END

PUBLIC SUB Button27_Click()
DIM v1, v2, f, i, re AS Integer    

    f = v2
    FOR i = 1 TO v2
    f = f * v1
  
    NEXT 
     re = f
    
END

PUBLIC SUB Button28_Click()

  DIM s AS Float
  s = Rad(TextBox1.Text)
  TextBox1.Text = Sin(s)
 
END

PUBLIC SUB Button29_Click()

 DIM c AS Float
  c = Rad(TextBox1.Text)
  TextBox1.Text = Cos(c)

END

PUBLIC SUB Button30_Click()
  DIM t AS Float
  t = Rad(TextBox1.Text)
  TextBox1.Text = Tan(t)
END

PUBLIC SUB Button31_Click()

  BAN = 10
 IF TextBox1.Text <> 0 THEN 
 OP1 = TextBox1.Text
 ELSE 
 OP1 = 0
 ENDIF 
TextBox1.Text = OP1

END




                                                  Cédula
PUBLIC SUB Main()
DIM b, c, d, e, f, g, h, i, x, z, xx AS Integer
DIM a AS String
PRINT "Ingrese el numero de cedula..."
INPUT a
FOR b = 1 TO 9 STEP 1
c = Str(Mid(a, b, 1))
d = b MOD 2
IF d = 0 THEN 
  i = i + c
  ELSE 
  h = c * 2
  IF h > 9 THEN 
  d = h MOD 10
  e = Int(h / 10)
  f = d + e
  ELSE 
  f = h
  ENDIF 
  g = g + f
  ENDIF 
  NEXT 
  x = g + i
  z = x MOD 10
  xx = 10 ­ z
  PRINT "El numero verificador es:...", xx
END

NOTA: Este ejercicio se ejecuta mediante la consola




                                             Juego 

PUBLIC SUB Button1_Click()

  DIM n1 AS Integer
  DIM n2 AS Integer
  DIM n3 AS Integer
  RANDOMIZE 
  n1 = Int(Rnd() * 10)
  n2 = Int(Rnd() * 10)
  n3 = Int(Rnd() * 10)
  TextBox1.Text = n1
  TextBox2.Text = n2
  TextBox3.Text = n3
  
  IF (n1 = n2) THEN 
    IF (n1 = n3) THEN 
    TextBox5.Text = TextBox4.Text * 2
    Message("Ganastes el Doble", "Puedes cobrar")
     TextBox1.Clear
     TextBox2.Clear
     TextBox3.Clear
     TextBox4.Clear
     TextBox5.Clear
  ELSE 
  IF (n1 = 7) THEN 
    IF (n2 = 7) THEN 
      IF (n3 = 7) THEN 
       TextBox5.Text = TextBox4.Text * 4
        Message("Ganastes el Premio Mayor", "Puedes cobrar")
        TextBox1.Clear
        TextBox2.Clear
        TextBox3.Clear
        TextBox4.Clear
        TextBox5.Clear
      ENDIF 
      ENDIF 
      ENDIF 
  ENDIF 
  ENDIF 
  
END

PUBLIC SUB Button2_Click()

  ME.Close

END




                                            Factura
PUBLIC i AS Integer
PUBLIC r AS Integer
PUBLIC m AS Integer

PUBLIC SUB _new()

END

PUBLIC SUB Form_Open()
TextBox5.SetFocus
GridView1.Columns.Count = 5
GridView1.Rows.Count = 10
GridView1.Columns[0].Width = 50
GridView1.Columns[1].Width = 200
GridView1.Columns[2].Width = 80
GridView1.Columns[3].Width = 50
GridView1.Columns[4].Width = 80
GridView1[0, 0].Text = "NUM"
GridView1[0, 1].Text = "DETALLE"
GridView1[0, 2].Text = "PRECIO.U"
GridView1[0, 3].Text = "CANT"
GridView1[0, 4].Text = "TOTAL"
r = 0
i = 0

END


PUBLIC SUB Button2_Click()

  TextBox1.Text = m
  TextBox2.Text = (m * 7) / 100
  TextBox3.Text = ((((TextBox1.Text) ­ (TextBox2.Text)) * 12) / 100)
  TextBox4.Text = (TextBox1.Text) ­ (TextBox2.Text) + (TextBox3.Text)
END

PUBLIC SUB TextBox5_KeyPress()

  IF Key.Code = 65293 THEN 
    IF TextBox5.Text = "" THEN 
      Message.Info("Ingrese Detalle")
      TextBox5.SetFocus
    ELSE 
     TextBox6.SetFocus
    ENDIF 
    ENDIF 

END


PUBLIC SUB TextBox7_KeyPress()

   IF Key.Code = 65293 THEN 
    IF TextBox7.Text = "" THEN 
    Message.Info("Ingrese Valor")
    TextBox7.SetFocus
    ELSE 
    i = i + 1
    r = r + 1
    TextBox8.Text = i
    GridView1[r, 0].Text = Val(TextBox8.Text)
    GridView1[r, 1].Text = (TextBox5.Text)
    GridView1[r, 2].Text = TextBox6.Text
    GridView1[r, 3].Text = TextBox7.Text
    
    TextBox9.Text = (TextBox6.Text) * (TextBox7.Text)
    GridView1[r, 4].Text = Val(TextBox9.Text)
    m = m + TextBox9.Text
    TextBox5.Text = ""
    TextBox6.Text = ""
    TextBox7.Text = ""
    TextBox5.SetFocus
    ENDIF 
  ENDIF 

END

PUBLIC SUB Button1_Click()

  TextBox1.Text = ""
  TextBox2.Text = ""
  TextBox3.Text = ""
  TextBox4.Text = ""
  TextBox5.Text = ""
  TextBox6.Text = ""
  TextBox7.Text = ""
  TextBox8.Text = ""
  TextBox9.Text = ""
  GridView1.Clear

END

PUBLIC SUB TextBox6_KeyPress()

  IF Key.Code = 65293 THEN
    IF TextBox6.Text = "" THEN 
       Message.Info("Ingrese Valor")
       TextBox6.SetFocus
    ELSE 
      TextBox7.SetFocus
                                                            ENDIF 
                                                           ENDIF  

                                                        END
Para realizar un gráfico
PUBLIC r AS Integer
PUBLIC posy AS Integer
PUBLIC posx AS Integer
PUBLIC al AS Integer
PUBLIC la AS Integer
PUBLIC SUB _new()

END

PUBLIC SUB Form_Open()
r = 20
al = 5
END

PUBLIC SUB Button1_Click()
  posy = area1.Height / 2
  posx = area1.Width / 2
  Draw.Begin(area1)
  Draw.FillColor = Color.RGB(100, 100, 50)
  Draw.FillStyle = Fill.Solid
  Draw.Circle(posx, posy, r)
  r = r + 20
  'Draw.Ellipse(200, 200, 100, 50)
  Draw.End

END

PUBLIC SUB Button3_Click()

  ME.Close

END

PUBLIC SUB Button2_Click()
  area1.Clear
  posy = area1.Height / 2
  posx = area1.Width / 2
  Draw.Begin(area1)
  Draw.FillColor = Color.RGB(100, 100, 50)
  Draw.FillStyle = Fill.Solid
  Draw.Circle(posx, posy, r)
  r = r ­ 20
  'Draw.Ellipse(200, 200, 100, 50)
  Draw.End
  

END

PUBLIC SUB Button4_Click()
  area1.Clear
  Draw.Begin(area1)
  posy = area1.Height / 2
  posx = area1.Width / 2
  Draw.FillColor = Color.RGB(100, 100, 50)
  Draw.FillStyle = Fill.Solid
  Draw.Rect(posx, posy, al, 20)
  'Draw.Ellipse(200, 200, 100, 50)
  Draw.End
   al = al + 10 
   al = al ­ (­10)
  
END




                                             Menú
PUBLIC SUB _new()

END
PUBLIC SUB Form_Open()

END

PUBLIC SUB Acerca_de_Click()

  Acercade.Show

END

PUBLIC SUB Cronometro_Click()

  Crono.Show
  

END

PUBLIC SUB Juego_Click()

  Jueg.Show

END

PUBLIC SUB Paint_Click()

  Pai.Show

END




                                 Cronómetro
PUBLIC SUB Timer1_Timer()

  seg.Text = Val(seg.Text) + 1
  IF seg.Text = 60 THEN
  min.Text = Val(min.Text) + 1
  seg.Text = 0
  ENDIF 
  IF min.Text = 60 THEN 
  hor.Text = Val(hor.Text) + 1
  min.Text = 0
  ENDIF 
END

PUBLIC SUB Button1_Click()

  IF Button1.Text = "Iniciar" THEN   
  Timer1.Enabled = TRUE
  Button1.Caption = "Parar"
  ELSE 
   Button1.Caption = "Iniciar"
   Timer1.Enabled = FALSE
   ENDIF 
END

PUBLIC SUB Button2_Click()

   seg.Text = "0"
   min.Text = "0"
   hor.Text = "0"
   Timer1.Enabled = TRUE
    Button1.Caption = "Parar"
   
   

END

PUBLIC SUB Button3_Click()

  ME.Close

END

PUBLIC SUB Form_Open()
  

END
Para realizar Operaciones Básicas

PUBLIC SUB _new()

END

PUBLIC SUB Form_Open()

END

PUBLIC SUB Label1_MouseDown()

  

END

PUBLIC SUB Button2_Click()

  TextBox1.Text = ""
  TextBox2.Text = ""
  TextBox3.Text = ""
  
END

PUBLIC SUB Button1_Click()

  TextBox3.Text = TextBox1.Text + TextBox2.Text

END

PUBLIC SUB Button6_Click()

  ME.Close

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 de números a letras
' Attribute VB_Name = "Module1" 
' Option Explicit 
 
PUBLIC FUNCTION EnLetras(numero AS String) AS String 
    DIM b, paso AS Integer 
    DIM expresion, entero, deci, flag AS String        
    flag = "N" 
    FOR paso = 1 TO Len(numero) 
        IF Mid(numero, paso, 1) = "." THEN 
            flag = "S" 
        ELSE 
            IF flag = "N" THEN 
                entero = entero & Mid(numero, paso, 1) 'Extae la parte entera del numero 
            ELSE 
                deci = deci & Mid(numero, paso, 1) 'Extrae la parte decimal del numero 
            END IF 
        END IF 
    NEXT 
'     paso 
     
    IF Len(deci) = 1 THEN 
        deci = deci & "0" 
    END IF 
    flag = "N" 
    IF Val(numero) >= ­999999999 AND Val(numero) <= 999999999 THEN 'si el numero esta 
dentro de 0 a 999.999.999 
        
        FOR paso = Len(entero) TO 1 STEP ­1 
            b = Len(entero) ­ (paso ­ 1) 
            
            SELECT CASE paso 
            CASE 3, 6, 9 
                SELECT CASE Mid(entero, b, 1) 
                    CASE "1" 
                        IF Mid(entero, b + 1, 1) = "0" AND Mid(entero, b + 2, 1) = "0" THEN 
                            expresion = expresion & "cien " 
                        ELSE 
                            expresion = expresion & "ciento " 
                        END IF 
                    CASE "2" 
                        expresion = expresion & "doscientos " 
                    CASE "3" 
                        expresion = expresion & "trescientos " 
                    CASE "4" 
                        expresion = expresion & "cuatrocientos " 
                    CASE "5" 
                        expresion = expresion & "quinientos " 
                    CASE "6" 
                        expresion = expresion & "seiscientos " 
                    CASE "7" 
                        expresion = expresion & "setecientos " 
                    CASE "8" 
                        expresion = expresion & "ochocientos " 
                    CASE "9" 
                        expresion = expresion & "novecientos " 
                END SELECT 
                 
            CASE 2, 5, 8 
                SELECT CASE Mid(entero, b, 1) 
                    CASE "1" 
                        IF Mid(entero, b + 1, 1) = "0" THEN 
                            flag = "S" 
                            expresion = expresion & "diez " 
                        END IF 
                        IF Mid(entero, b + 1, 1) = "1" THEN 
                            flag = "S" 
                            expresion = expresion & "once " 
                        END IF 
                        IF Mid(entero, b + 1, 1) = "2" THEN 
                            flag = "S" 
                            expresion = expresion & "doce " 
                        END IF 
                        IF Mid(entero, b + 1, 1) = "3" THEN 
                            flag = "S" 
                            expresion = expresion & "trece " 
                        END IF 
                        IF Mid(entero, b + 1, 1) = "4" THEN 
                            flag = "S" 
                            expresion = expresion & "catorce " 
                        END IF 
                        IF Mid(entero, b + 1, 1) = "5" THEN 
                            flag = "S" 
                            expresion = expresion & "quince " 
                        END IF 
                        IF Mid(entero, b + 1, 1) > "5" THEN 
                            flag = "N" 
                            expresion = expresion & "dieci" 
                        END IF 
                 
                    CASE "2" 
                        IF Mid(entero, b + 1, 1) = "0" THEN 
                            expresion = expresion & "veinte " 
                            flag = "S" 
                        ELSE 
                            expresion = expresion & "veinti" 
                            flag = "N" 
                        END IF 
                     
                    CASE "3" 
                        IF Mid(entero, b + 1, 1) = "0" THEN 
                            expresion = expresion & "treinta " 
                            flag = "S" 
                        ELSE 
                            expresion = expresion & "treinta y " 
                            flag = "N" 
                        END IF 
                 
                    CASE "4" 
                        IF Mid(entero, b + 1, 1) = "0" THEN 
                            expresion = expresion & "cuarenta " 
                            flag = "S" 
                        ELSE 
                            expresion = expresion & "cuarenta y " 
                            flag = "N" 
                        END IF 
                 
                    CASE "5" 
                        IF Mid(entero, b + 1, 1) = "0" THEN 
                            expresion = expresion & "cincuenta " 
                            flag = "S" 
                        ELSE 
                            expresion = expresion & "cincuenta y " 
                            flag = "N" 
                        END IF 
                 
                    CASE "6" 
                        IF Mid(entero, b + 1, 1) = "0" THEN 
                            expresion = expresion & "sesenta " 
                            flag = "S" 
                        ELSE 
                            expresion = expresion & "sesenta y " 
                            flag = "N" 
                        END IF 
                 
                    CASE "7" 
                        IF Mid(entero, b + 1, 1) = "0" THEN 
                            expresion = expresion & "setenta " 
                            flag = "S" 
                        ELSE 
                            expresion = expresion & "setenta y " 
                            flag = "N" 
                        END IF 
                 
                    CASE "8" 
                        IF Mid(entero, b + 1, 1) = "0" THEN 
                            expresion = expresion & "ochenta " 
                            flag = "S" 
                        ELSE 
                            expresion = expresion & "ochenta y " 
                            flag = "N" 
                        END IF 
                 
                    CASE "9" 
                        IF Mid(entero, b + 1, 1) = "0" THEN 
                            expresion = expresion & "noventa " 
                            flag = "S" 
                        ELSE 
                            expresion = expresion & "noventa y " 
                            flag = "N" 
                        END IF 
                END SELECT 
                 
            CASE 1, 4, 7 
                SELECT CASE Mid(entero, b, 1) 
                    CASE "1" 
                        IF flag = "N" THEN 
                            IF paso = 1 THEN 
                                expresion = expresion & "uno " 
                            ELSE 
                                expresion = expresion & "un " 
                            END IF 
                        END IF 
                    CASE "2" 
                        IF flag = "N" THEN 
                            expresion = expresion & "dos " 
                        END IF 
                    CASE "3" 
                        IF flag = "N" THEN 
                            expresion = expresion & "tres " 
                        END IF 
                    CASE "4" 
                        IF flag = "N" THEN 
                            expresion = expresion & "cuatro " 
                        END IF 
                    CASE "5" 
                        IF flag = "N" THEN 
                            expresion = expresion & "cinco " 
                            
                        END IF 
                    CASE "6" 
                        IF flag = "N" THEN 
                            expresion = expresion & "seis " 
                        END IF 
                    CASE "7" 
                        IF flag = "N" THEN 
                            expresion = expresion & "siete " 
                        END IF 
                    CASE "8" 
                        IF flag = "N" THEN 
                            expresion = expresion & "ocho " 
                        END IF 
                    CASE "9" 
                        IF flag = "N" THEN 
                            expresion = expresion & "nueve " 
                        END IF 
                END SELECT 
            END SELECT 
            IF paso = 4 THEN 
                IF Mid(entero, 6, 1) <> "0" OR Mid(entero, 5, 1) <> "0" OR Mid(entero, 4, 1) <> "0" OR 
(Mid(entero, 6, 1) = "0" AND Mid(entero, 5, 1) = "0" AND Mid(entero, 4, 1) = "0" AND 
Len(entero) <= 6) THEN 
                    expresion = expresion & "mil " 
                END IF 
            END IF 
            IF paso = 7 THEN 
                IF Len(entero) = 7 AND Mid(entero, 1, 1) = "1" THEN 
                    expresion = expresion & "millón " 
                ELSE 
                    expresion = expresion & "millones " 
                END IF 
            END IF 
        NEXT 
'         paso 
         
        IF deci <> "" THEN 
            IF Mid(entero, 1, 1) = "­" THEN 'si el numero es negativo 
                expresion = "menos " & expresion & "con " & deci & "/100" 
            ELSE 
                expresion = expresion & "con " & deci & "/100" 
            END IF 
        ELSE 
            IF Mid(entero, 1, 1) = "­" THEN 'si el numero es negativo 
                expresion = "menos " & expresion 
            ELSE 
                expresion = expresion 
            END IF 
        END IF 
    ELSE 'si el numero a convertir esta fuera del rango superior e inferior 
        expresion = "" 
    END IF 
    TextBox2.Text = expresion
END FUNCTION 

PUBLIC SUB Button1_Click()
EnLetras(TextBox1.Text)
' TextBox2.Text = "3"
END

PUBLIC SUB Button3_Click()

  TextBox1.Text = ""
  TextBox2.Text = ""

END

PUBLIC SUB Button2_Click()

  ME.Close

END

Mais conteúdo relacionado

Mais procurados

Ejemplo En Gambas
Ejemplo En GambasEjemplo En Gambas
Ejemplo En Gambaseduann
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subirguest9da3a3
 
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicitElixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicitTobias Pfeiffer
 
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicitElixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicitTobias Pfeiffer
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subirguest9da3a3
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subirguest9da3a3
 
The Ring programming language version 1.5.3 book - Part 46 of 184
The Ring programming language version 1.5.3 book - Part 46 of 184The Ring programming language version 1.5.3 book - Part 46 of 184
The Ring programming language version 1.5.3 book - Part 46 of 184Mahmoud Samir Fayed
 
Excel macro for solving a polynomial equation
Excel macro for solving a polynomial equationExcel macro for solving a polynomial equation
Excel macro for solving a polynomial equationUpendra Lele
 
The Ring programming language version 1.3 book - Part 36 of 88
The Ring programming language version 1.3 book - Part 36 of 88The Ring programming language version 1.3 book - Part 36 of 88
The Ring programming language version 1.3 book - Part 36 of 88Mahmoud Samir Fayed
 
Phoenix for laravel developers
Phoenix for laravel developersPhoenix for laravel developers
Phoenix for laravel developersLuiz Messias
 

Mais procurados (15)

Ejemplo En Gambas
Ejemplo En GambasEjemplo En Gambas
Ejemplo En Gambas
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subir
 
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicitElixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicit
 
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicitElixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicit
 
Writeable CTEs: The Next Big Thing
Writeable CTEs: The Next Big ThingWriteable CTEs: The Next Big Thing
Writeable CTEs: The Next Big Thing
 
My sql cheat sheet
My sql cheat sheetMy sql cheat sheet
My sql cheat sheet
 
Py3k
Py3kPy3k
Py3k
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subir
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subir
 
Gambas
Gambas Gambas
Gambas
 
Python crush course
Python crush coursePython crush course
Python crush course
 
The Ring programming language version 1.5.3 book - Part 46 of 184
The Ring programming language version 1.5.3 book - Part 46 of 184The Ring programming language version 1.5.3 book - Part 46 of 184
The Ring programming language version 1.5.3 book - Part 46 of 184
 
Excel macro for solving a polynomial equation
Excel macro for solving a polynomial equationExcel macro for solving a polynomial equation
Excel macro for solving a polynomial equation
 
The Ring programming language version 1.3 book - Part 36 of 88
The Ring programming language version 1.3 book - Part 36 of 88The Ring programming language version 1.3 book - Part 36 of 88
The Ring programming language version 1.3 book - Part 36 of 88
 
Phoenix for laravel developers
Phoenix for laravel developersPhoenix for laravel developers
Phoenix for laravel developers
 

Destaque

Ensayo sobre la gestión de la calidad en las bibliotecas universitarias
Ensayo sobre la gestión de la calidad en las bibliotecas universitariasEnsayo sobre la gestión de la calidad en las bibliotecas universitarias
Ensayo sobre la gestión de la calidad en las bibliotecas universitariasIsidra Rivas Vargas
 
Casestudy March08 Final 3
Casestudy March08 Final 3Casestudy March08 Final 3
Casestudy March08 Final 3cavebring
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldabaux singapore
 

Destaque (8)

Ensayo sobre la gestión de la calidad en las bibliotecas universitarias
Ensayo sobre la gestión de la calidad en las bibliotecas universitariasEnsayo sobre la gestión de la calidad en las bibliotecas universitarias
Ensayo sobre la gestión de la calidad en las bibliotecas universitarias
 
Casestudy March08 Final 3
Casestudy March08 Final 3Casestudy March08 Final 3
Casestudy March08 Final 3
 
Los Suelos
Los SuelosLos Suelos
Los Suelos
 
Atomosymoleculas
AtomosymoleculasAtomosymoleculas
Atomosymoleculas
 
Los Suelos
Los SuelosLos Suelos
Los Suelos
 
Estudio de la Materia
Estudio de la MateriaEstudio de la Materia
Estudio de la Materia
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
 

Semelhante a Ejercicios

Semelhante a Ejercicios (20)

ejemplos gambas
ejemplos gambasejemplos gambas
ejemplos gambas
 
Calculadora
CalculadoraCalculadora
Calculadora
 
Yolygambas
YolygambasYolygambas
Yolygambas
 
Yolygambas
YolygambasYolygambas
Yolygambas
 
Yolygambas
YolygambasYolygambas
Yolygambas
 
Calculadora
CalculadoraCalculadora
Calculadora
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subir
 
Proyecto Blob
Proyecto BlobProyecto Blob
Proyecto Blob
 
Proyecto 2er Parcial
Proyecto 2er ParcialProyecto 2er Parcial
Proyecto 2er Parcial
 
Yuliana
YulianaYuliana
Yuliana
 
Programas Gambas
Programas GambasProgramas Gambas
Programas Gambas
 
Programas Gambas
Programas GambasProgramas Gambas
Programas Gambas
 
Visual Basic
Visual BasicVisual Basic
Visual Basic
 
Updated Visual Basic 6 for beginners.pptx
Updated Visual Basic 6 for beginners.pptxUpdated Visual Basic 6 for beginners.pptx
Updated Visual Basic 6 for beginners.pptx
 
Inventory management
Inventory managementInventory management
Inventory management
 
Area de un triangulo
Area de un trianguloArea de un triangulo
Area de un triangulo
 
Richtextbox
RichtextboxRichtextbox
Richtextbox
 
Vb file
Vb fileVb file
Vb file
 
PYTHON PROGRAMMING for first year cse students
PYTHON  PROGRAMMING for first year cse studentsPYTHON  PROGRAMMING for first year cse students
PYTHON PROGRAMMING for first year cse students
 
2014 computer science_question_paper
2014 computer science_question_paper2014 computer science_question_paper
2014 computer science_question_paper
 

Mais de Carmen Bermello Barreiro (13)

Ejercicios
EjerciciosEjercicios
Ejercicios
 
Ejerciciosdeprogramacion
EjerciciosdeprogramacionEjerciciosdeprogramacion
Ejerciciosdeprogramacion
 
La Firma Digital
La Firma DigitalLa Firma Digital
La Firma Digital
 
Las Aportaciones De Las Tics
Las Aportaciones De Las TicsLas Aportaciones De Las Tics
Las Aportaciones De Las Tics
 
Diapositivas
DiapositivasDiapositivas
Diapositivas
 
Diapositivas
DiapositivasDiapositivas
Diapositivas
 
Diapositivas
DiapositivasDiapositivas
Diapositivas
 
Microprocesadores 386 486
Microprocesadores 386 486Microprocesadores 386 486
Microprocesadores 386 486
 
Hub Switch
Hub SwitchHub Switch
Hub Switch
 
Impresoras
ImpresorasImpresoras
Impresoras
 
Sistemas De NumeracióN
Sistemas De NumeracióNSistemas De NumeracióN
Sistemas De NumeracióN
 
Vanecar
VanecarVanecar
Vanecar
 
Sistema De NumeracióN
Sistema De NumeracióNSistema De NumeracióN
Sistema De NumeracióN
 

Último

Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptxmary850239
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesVijayaLaxmi84
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 

Último (20)

Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their uses
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 

Ejercicios