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
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)
miércoles, 23 de marzo de 2011
dim usuarios(4) as string
usuarios(0) = textbox1.text
usuarios(1) = textbox2.text
usuarios(2) = textbox3.text
usuarios(3) = textbox4.text
textbox5.text = usuarios(0) + vbcrlf + usuarios(1) + vbcrlf + usuarios(2) + vbcrlf + usuarios(3)
+ vbcrlf
condisiones if textbox9.text = 1 then
textbox10.text = "nombre:" + nombres(1) + vbcrlf + "edad:" + cstr(edad(1)) end if
lunes, 14 de marzo de 2011
funciones de conversiones
y = f(x) = 1+2
y = f(3) = 5
y = cstr(x)
y = variable sting
*label.text=
textbox.text = cstr (50)
cuando tengo que hacer una conversion :
cuando al otro lado del igual haga un text , cstr
*cint ( )
cint ("55") Numero entero
cabl ("55.32")
cdate ("03/03/2011")
*matrices /arrays ( arreglo )
dim nombre1 as string
dim nombre2 as string
dim nombres(50) as string
cantidad o mayor indice
nombres(3) = "juanita"
MATRICES:
es una secuencia de elementos con los datos del mismo tipo se acceden por el nombre de la matrix
y un indice qie empiesa en 0
lunes, 7 de marzo de 2011
nuevos trabajos en clase
dim nombre as sting
dim sueldo as decimal
nombre = textbox1.text
sueldo = textbox2.text
label3.text=nombre+"usted gano" + cstr (sueldo)
private sub ->subrutina
button1_->objeto
click->evento
dim nombre as sting
dim sueldo as decimal
dim ventas as decimal
dim total as decimal
nombre = textbox1.text
sueldos = textbox.text
ventas = textbox3.text
total = (venta*0.1)+ sueldo
textbox4.text=nombre+",usted gano," + cstr (total)
miércoles, 23 de febrero de 2011
progromacion de computadores
NELSON JULIAN PLATA RUIZ
DISEÑO Y ADMINISTRACION DE SISTEMAS
PROGRAMACION DE COMPUTADORES
1. TEMAS VISTOS EN CLASES
* VARIABLE: es un nombre para direcciones de memoria que sirven para almacenar valores
temporalmente
* reglas para poner nombre debe empezar con un caracter alfabetico o un guion abajo, no puede utilizar espacio ni simbolos
*1)
en la siguiente clase
se utilizo una forma de programar para q apareciera un resultado especificando
lo que se pide en la operacion
nombre
sueldo basico
total
lo que se pida
colocando
dim NOMBRE as sting
dim SUELDO as decimal
dim VENTAS as decimal
nombre = textbox1.text
sueldo = textbox2.text
ventas = textbox2.text
total = (venta*o.1) + sueldo
textbox4.text = nombre + " uste gano." + cstr(total)
TIPOS DE DATOS DE LAS VARIABLES
STING: texto
DATE: guardar fechas
NUMERICA :
INTEGER: entero
DOUBLE: punto decimal
SINGLE
BYTE: numerico pequeñas
DECIMAL: plata
2 DECLARAR UNA VARIABLE
dim numest as single
* se trabaja con visual studio 2010
pasos para empezar un archivo nuevo
archivo->nuevo->proyecto
windows
aplicacion de windows forms
dar nombre
aceptar
*label = letras: texto
*controles-> propiedades
->objetos
textbox: operaciones
*EVENTO : accion con el mouse o con el teclado
para programar el button para hacer una calculadora
*dim num1 as single
dim num2 as single
dim resultado as single
num1= textbox1.text
num2= textbox2.text
resultado= num1 + num2
textbox3.text= cstr (resultado)
CSTR : convierte un numero en texto
Suscribirse a:
Entradas (Atom)