SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

Presentationsubiafreeland
PresentationsubiafreelandPresentationsubiafreeland
Presentationsubiafreelandsoccersubi12
 
World Traders Seminar
World Traders SeminarWorld Traders Seminar
World Traders Seminarjohnfarthing
 
Sima No Notes~220609[1]
Sima No Notes~220609[1]Sima No Notes~220609[1]
Sima No Notes~220609[1]johnfarthing
 
Trapper Keeper Inserts
Trapper Keeper InsertsTrapper Keeper Inserts
Trapper Keeper InsertsMar Smith
 
Ant presentation
Ant presentationAnt presentation
Ant presentationJo Luck
 
AIM Campaign Book
AIM Campaign BookAIM Campaign Book
AIM Campaign BookMar Smith
 
Online Operating Systems1
Online Operating Systems1Online Operating Systems1
Online Operating Systems1myuhasz5999
 
Presentatie Mds
Presentatie MdsPresentatie Mds
Presentatie Mdsysoesan
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administrationharirxg
 
Copyright In The Technology Age Powerpoint
Copyright In The Technology Age PowerpointCopyright In The Technology Age Powerpoint
Copyright In The Technology Age Powerpointmee789
 
The Nobility of Policing
The Nobility of PolicingThe Nobility of Policing
The Nobility of PolicingMar Smith
 
Notas da Angola Portuguesa
Notas da Angola PortuguesaNotas da Angola Portuguesa
Notas da Angola PortuguesaVictor Veiga
 

Andere mochten auch (14)

Presentationsubiafreeland
PresentationsubiafreelandPresentationsubiafreeland
Presentationsubiafreeland
 
A better you
A better youA better you
A better you
 
World Traders Seminar
World Traders SeminarWorld Traders Seminar
World Traders Seminar
 
Sima No Notes~220609[1]
Sima No Notes~220609[1]Sima No Notes~220609[1]
Sima No Notes~220609[1]
 
Trapper Keeper Inserts
Trapper Keeper InsertsTrapper Keeper Inserts
Trapper Keeper Inserts
 
Pp
PpPp
Pp
 
Ant presentation
Ant presentationAnt presentation
Ant presentation
 
AIM Campaign Book
AIM Campaign BookAIM Campaign Book
AIM Campaign Book
 
Online Operating Systems1
Online Operating Systems1Online Operating Systems1
Online Operating Systems1
 
Presentatie Mds
Presentatie MdsPresentatie Mds
Presentatie Mds
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Copyright In The Technology Age Powerpoint
Copyright In The Technology Age PowerpointCopyright In The Technology Age Powerpoint
Copyright In The Technology Age Powerpoint
 
The Nobility of Policing
The Nobility of PolicingThe Nobility of Policing
The Nobility of Policing
 
Notas da Angola Portuguesa
Notas da Angola PortuguesaNotas da Angola Portuguesa
Notas da Angola Portuguesa
 

Ähnlich wie Ejercicios

Ähnlich wie 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
 

Mehr von 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
 

Kürzlich hochgeladen

Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 

Kürzlich hochgeladen (20)

Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 

Ejercicios