Aprendiendo a programar
Es un bloc que te ara la vida mas fácil en la programación
MINI CALCULADORA
este código que les presento es para una mini calculadora con las operaciones basicas suma,resta,división , multiplicación.
ocuparemos seis botones uno para suma, otro para resta, otro para division, multiplicasion, limpiar, cerar.
boton de suma;
val(texbox1.text)b=val(textbox2.text)
c=a+b
textbox1.text=c
textbox2.text=c
boton de resta;
c=a-b
textbox1.text=c
textbox2.text=c
boton de multiplicacion;
c=a*b
textbox1.text=c
textbox2.text=c
c=a*b
textbox1.text=c
textbox2.text=c
boton de division;
c=a/b
textbox1.text=c
textbox2.text=c
boton limpiar:
texbox1.clear()
texbox2.clear()
texbox3.clear()
boton cerrar:
me.close
CONVERSOR DEMONEDAS
este programa nos sirve para convertir dolares a euros.
nesecitaremos tres texbox dosbotones uno con el nombre limpiar y el otro cerar.
declaramos variables
public a,b,c as double
a= val (textbox.1).text
b= val (textbox.2).text
c= a/b (textbox.3).text=c
texbox1.focus()
texbox1.clear()
texbox2.clear()
texbox3.clear()
me.close()
NAVEGADOR WEB
crearemos un navegador web nesecitaremos un tabcontro.
web broese
rich texbox
texbox
botones con los nombres ir a y ver fuente
boton navegar (ir a)
iftcprincipal.celected tab is tpweb then
if txturl.text.trim()<>string.emtythen
if not txturl.text.trim().tolower().starwith("http://") then
txturl.text="http://"&txturl,text trim()
end if
c=a/b
textbox1.text=c
textbox2.text=c
boton limpiar:
texbox1.clear()
texbox2.clear()
texbox3.clear()
boton cerrar:
me.close
CONVERSOR DEMONEDAS
este programa nos sirve para convertir dolares a euros.
nesecitaremos tres texbox dosbotones uno con el nombre limpiar y el otro cerar.
declaramos variables
public a,b,c as double
a= val (textbox.1).text
b= val (textbox.2).text
c= a/b (textbox.3).text=c
texbox1.focus()
texbox1.clear()
texbox2.clear()
texbox3.clear()
me.close()
NAVEGADOR WEB
crearemos un navegador web nesecitaremos un tabcontro.
web broese
rich texbox
texbox
botones con los nombres ir a y ver fuente
boton navegar (ir a)
iftcprincipal.celected tab is tpweb then
if txturl.text.trim()<>string.emtythen
if not txturl.text.trim().tolower().starwith("http://") then
txturl.text="http://"&txturl,text trim()
end if
No hay comentarios:
Publicar un comentario