dim grafico as graphics
dim lapiz as pen
grafico = create graphics
lapiz = new pen ( color.red.2)
grafico. drawline ( lapiz.10.10.100.100)
draw ellipse->circulo
draw rectangulo ->cuadrado
BASE DE DATOS:
algunas bases de datos
->access
->mysql
->oracle
->sqlserver
->informix
->sybase
para agregar desde base de datos(access)
a visual
datos_mostrar origines de datos_herramientas_conectar base de datos_datos_agregar nuevo origen de dato
sistemas
miércoles, 8 de junio de 2011
*FOR :
-> Variables
for i 0 to 3
for j = it 1 to 2
if (d(i)>d(j))then
temporal = D(i)
D(i)=D(j)
D(j) = temporal
end if
next j
next i
*
for i = 0 to 2
for_1 = i +1 to 3
if ( D (i)>D(j) ) then
temporal = D (i)
D(j)= temporal
end if
next j
nexti
*SELEC CASE
(haga segun el caso)
*select case variable
case valor 1..
case valor 2..
case valor 3..
end select
select case figura
case"circulo"
dibuje_circulo()
case"cuadrado":
dibuje_cuadrado()
case"triangulo":
dibuje_triangulo()
end select
-> Variables
for i 0 to 3
for j = it 1 to 2
if (d(i)>d(j))then
temporal = D(i)
D(i)=D(j)
D(j) = temporal
end if
next j
next i
*
for i = 0 to 2
for_1 = i +1 to 3
if ( D (i)>D(j) ) then
temporal = D (i)
D(j)= temporal
end if
next j
nexti
*SELEC CASE
(haga segun el caso)
*select case variable
case valor 1..
case valor 2..
case valor 3..
end select
select case figura
case"circulo"
dibuje_circulo()
case"cuadrado":
dibuje_cuadrado()
case"triangulo":
dibuje_triangulo()
end select
lunes, 9 de mayo de 2011
*
if ( ventas >=3000000) then
valcomision = ventas * comision/100
textbox3.text = "comision = " + cstr ( valcomision)
else
textbox3.text = " ventas inferiores a 3000000 "
end if
*
dim num as single
dim sumapar a integer
dim suminpar as single
dim suma as single
textbox1.text = num
for 1 = 1 to num
suma + i
next i
for j = 2 to num step2
sumapar + = j
nextj
for z = 1 to num step2
suminpar t = z
next z
if ( ventas >=3000000) then
valcomision = ventas * comision/100
textbox3.text = "comision = " + cstr ( valcomision)
else
textbox3.text = " ventas inferiores a 3000000 "
end if
*
dim num as single
dim sumapar a integer
dim suminpar as single
dim suma as single
textbox1.text = num
for 1 = 1 to num
suma + i
next i
for j = 2 to num step2
sumapar + = j
nextj
for z = 1 to num step2
suminpar t = z
next z
* dim num1 as single
dim num2 as single
num1 = textbox1.text
num2 = and cint((6*indc))+1)
textbox2.text = cstr(num2)
if ( num1<=num2) then
textbox3.text= " perdio"
else
textbox3.text = " gano"
end if
*
dim LA as single
dim LB as single
dim LC as single
LA = textbox1.text
LB = textbox2.text
LC = textbox3.text
if (( LA = LB ) and ( LB = LC )) then
textbox4.text = " equilatero"
else
if (( LA <>LB) and (LA<>LC) and (LB<>LC)) then
textbox4.text = "escaleno"
else
textbox4.text = "isoseles"
end if
end if
dim num2 as single
num1 = textbox1.text
num2 = and cint((6*indc))+1)
textbox2.text = cstr(num2)
if ( num1<=num2) then
textbox3.text= " perdio"
else
textbox3.text = " gano"
end if
*
dim LA as single
dim LB as single
dim LC as single
LA = textbox1.text
LB = textbox2.text
LC = textbox3.text
if (( LA = LB ) and ( LB = LC )) then
textbox4.text = " equilatero"
else
if (( LA <>LB) and (LA<>LC) and (LB<>LC)) then
textbox4.text = "escaleno"
else
textbox4.text = "isoseles"
end if
end if
lunes, 2 de mayo de 2011
*
if textbox1.text >=5000 then
textbox2.text = "nos vamos a tomar cerveza"
else
textbox2.text = lichigo"
end if
*
dim dinero as single
dinero = textbox1.text
if dinero >= 50000 then
textbox2.text = "nos vamos a tomar cerveza"
else
textbox2.text = "lichigo"
end if
*
dim dinero as single
dinero = textbox1.text
if dinero >= 50000 then
if programa = "s" then
textbox2.text = " ah bueno otro dia "
else
textbox2.text = "nos vamos a tomar cerveza"
end if
else
textbox2.text = "pailas no hay dinero"
end if
if textbox1.text >=5000 then
textbox2.text = "nos vamos a tomar cerveza"
else
textbox2.text = lichigo"
end if
*
dim dinero as single
dinero = textbox1.text
if dinero >= 50000 then
textbox2.text = "nos vamos a tomar cerveza"
else
textbox2.text = "lichigo"
end if
*
dim dinero as single
dinero = textbox1.text
if dinero >= 50000 then
if programa = "s" then
textbox2.text = " ah bueno otro dia "
else
textbox2.text = "nos vamos a tomar cerveza"
end if
else
textbox2.text = "pailas no hay dinero"
end if
DATOS
Matrices
dim nombre(4) as string
dim edad(4) as single
nombre(1) = textbox1.text
nombre(2) = textbox2.text
nombre(3) = textbox3.text
nombre(4) = textbox4.text
edad(1) = textbox5.text
edad(2) = textbox6.text
edad(3) = textbox7.text
edad(4) = textbox8.text
if textbox9.text = 1 then
textbox10.text = "nombre:"+nombre(1)+vbcrlf+"edad:"+cstr(edad(1))
se escribe 3 veses mas cambiando le el numero de de nombre edad
* dim datos(4.2) as string
datos(0,0) = textbox1.text
datod(1.0) = textbox2.text
datos(2.0) = textbox3.text
datod(3.0) = textbox4.text
datos(0.1) = textbox5.text
datos(1.1) = textbox6.text
imprime = opcion -1
textbox10.text = "nombre:"+datos(imprime,0)+vbcrlf+"edad"+ datos (imprime,1)
Matrices
dim nombre(4) as string
dim edad(4) as single
nombre(1) = textbox1.text
nombre(2) = textbox2.text
nombre(3) = textbox3.text
nombre(4) = textbox4.text
edad(1) = textbox5.text
edad(2) = textbox6.text
edad(3) = textbox7.text
edad(4) = textbox8.text
if textbox9.text = 1 then
textbox10.text = "nombre:"+nombre(1)+vbcrlf+"edad:"+cstr(edad(1))
se escribe 3 veses mas cambiando le el numero de de nombre edad
* dim datos(4.2) as string
datos(0,0) = textbox1.text
datod(1.0) = textbox2.text
datos(2.0) = textbox3.text
datod(3.0) = textbox4.text
datos(0.1) = textbox5.text
datos(1.1) = textbox6.text
imprime = opcion -1
textbox10.text = "nombre:"+datos(imprime,0)+vbcrlf+"edad"+ datos (imprime,1)
Suscribirse a:
Entradas (Atom)