Está en la página 1de 5

MANUAL CON MUCHO AMOR GRACIAS A DIOS Y A MI LINDA HIJA QUE AMO MUCHO.

PASOS PARA CREAR UN FORMULARIO EN FORMA RAPIDA EMPLEANDO VARIABLES DE


ENTORNO CON BASE DE DATOS EXTERNAS (SQL SERVER O BASE DE DATOS DE SYBASE).
EJEMPLO :
CREAREMOS UN FORMULARIO DE INGRESOS Y CONTROL DE FICHAS VISITAS

COMO VEMOS YA ESTA TERMIONADO AHORA PROCEDERMOS A EXPLICAR PASO A PASO


OBSERVEMOS LAS TABLAS QUE EMPLEAREMOS DE UAN VISTA REMOTA

AHORA PODEMOS OBSERVAR LAS TABLAS Y LOS BOTONES EXISTENTES, INCLUYENDO FOTOS
E IMGENES APARA ANEXAR EN UN MEJOR CONTROL Y RAPIDO :
EN EL BOTON ADICIONAR EL EVENTO CLICK, PODEMOS OBSERVAR LAS VARIABLES DE
INICIO:
l=messagebox("Desea Ingresar una nueva ficha...?",4+32+0,"INPE DRL")
if l=6
thisform.txtcodigo.value=" "
thisform.txtnombres.value=" "
thisform.txtApepat.value=" "
thisform.txtApemat.value=" "
thisform.txttelefono.value=" "
thisform.combo1.value=" "
thisform.txtnumerodoc.value=" "
thisform.combo2.value=" "
thisform.combo3.value=" "
thisform.txtsexo.value=" "
thisform.txtprofesion.value=" "
thisform.combo4.value=" "
thisform.txtfechanacim.value={}
thisform.edtingresamas.value=" "
thisform.edtobservado.value=" "
thisform.txtDireccion.value=" "
thisform.txtcodinterno.value=" "
thisform.txtnominterno.value=" "
thisform.txtpateinter.value=" "
thisform.txtmateinter.value=" "
thisform.txtcodinterno2.value=" "
thisform.txtpabellon.value=" "
thisform.txtala.value=" "
thisform.txtpiso.value=" "
thisform.combo5.value=" "
thisform.combo6.value=" "
thisform.combo7.value=" "
thisform.txtsancionado.value=" "
thisform.edtobservainter.value=" "
thisform.combo8.value=" "
thisform.combo9.value=" "
thisform.text3.value=" "
thisform.label8.caption="NUEVO"
thisform.txtnombres.setfocus
endif
thisform.txtnombres.setfocus
AHORA SI QUIERO AADIR UN TITUTO CAPTION EN MOVIMIENTO GENERAMOS UN EVENTO
TIMER Y LO CUAL ESCRIBIREMOS
cTitulo = "Padrn General de Visitas de Internos
"
ctitulo = cTitulo+space(len(cTitulo))
nTamano = Len(cTitulo)
If ThisForm.pos <= nTamano
**/ desplazando hacia la derecha
ntitulo1=Substr(cTitulo,Thisform.pos,nTamano-thisform.pos+1)
ntitulo2=IIF(thisform.pos>1, Substr(cTitulo,1,Thisform.pos),"")
**/ desplazando hacia la izquierda
nTitulo3=Substr(cTitulo,nTamano-thisform.pos+1,thisform.pos)
nTitulo4=Substr(cTitulo,1,nTamano-thisform.pos)
ThisForm.caption = ntitulo1+ntitulo2
ThisForm.pos = ThisForm.pos + 1
Else
ThisForm.pos = 1
Endif

COMO PUEDES OBSERVAR LO MAS FACIL QUE ES LA PROGRAMACION EN MODO EVENTOS A


FIN DE AHORRAR TU TIEMPO EN LA PROGRAMACION DE VARIABLES A FIN DE LIBERAR
MEMORIA EN TU PC
AHORA PROCEDEMOS A ESCRIBIR EN EL VENTO CLICK DE BOTON GRABAR
l=messagebox("Desea Grabar este Registro..?",4+32+0,"SISTEMA VISITA")
if l=6
DO CASE
CASE thisform.label8.caption="NUEVO"
Select VISIPADRON
Append blank
Repla VISIPADRON.codigo with thisform.txtcodigo.value
Repla VISIPADRON.nombres with thisform.txtnombres.value
Repla VISIPADRON.Apepat with thisform.txtApepat.value
Repla VISIPADRON.Apemat with thisform.txtApemat.value
Repla VISIPADRON.telefono with thisform.txttelefono.value
Repla VISIPADRON.documento with thisform.combo1.value
Repla VISIPADRON.numerodoc with thisform.txtnumerodoc.value
Repla VISIPADRON.estadocivil with thisform.combo2.value
Repla VISIPADRON.gradoinstruc with thisform.combo3.value
Repla VISIPADRON.sexo with thisform.txtsexo.value
Repla VISIPADRON.profesion with thisform.txtprofesion.value
Repla VISIPADRON.parentesco with thisform.combo4.value
Repla VISIPADRON.fechanacim with thisform.txtfechanacim.value
Repla VISIPADRON.ingresamas with thisform.edtingresamas.value
Repla VISIPADRON.observado with thisform.edtobservado.value
Repla VISIPADRON.direccion with thisform.txtDireccion.value
Repla VISIPADRON.codinterno with thisform.txtcodinterno.value
Repla VISIPADRON.documinterno with thisform.txtcodinterno2.value
Repla VISIPADRON.nominterno with thisform.txtnominterno.value
Repla VISIPADRON.pateinter with thisform.txtpateinter.value
Repla VISIPADRON.mateinter with thisform.txtmateinter.value
Repla VISIPADRON.pabellon with thisform.txtpabellon.value
Repla VISIPADRON.ala with thisform.txtala.value
Repla VISIPADRON.piso with thisform.txtpiso.value
Repla VISIPADRON.delitogene with thisform.combo5.value
Repla VISIPADRON.delitoespe with thisform.combo6.value
Repla VISIPADRON.situajuridi with thisform.combo7.value
Repla VISIPADRON.sancionado with thisform.txtsancionado.value
Repla VISIPADRON.observainter with thisform.edtobservainter.value
Repla VISIPADRON.region with thisform.combo8.value
Repla VISIPADRON.epenal with thisform.combo9.value
Repla VISIPADRON.codigo with thisform.txtnumerodoc.value
Repla VISIPADRON.fotovisita with thisform.text4.value
Repla VISIPADRON.fotointerno with thisform.text5.value
Repla VISIPADRON.ruta with thisform.text6.value
wait window "Enlazando..." timeout(0.25)
Select VISIFICHA
Append blank
Repla VISIFICHA.codigo with thisform.txtcodigo.value
Repla VISIFICHA.numerodoc with
thisform.txtnumerodoc.value
Repla VISIFICHA.nombres with thisform.txtnombres.value
Repla VISIFICHA.Apepat with thisform.txtApepat.value
Repla VISIFICHA.Apemat with thisform.txtApemat.value
Repla VISIFICHA.telefono with thisform.txttelefono.value
Repla VISIFICHA.documento with thisform.combo1.value
Repla VISIFICHA.direccion with thisform.txtDireccion.value
Repla VISIFICHA.codinterno with thisform.txtcodinterno.value
Repla VISIFICHA.nominterno with
thisform.txtnominterno.value
Repla VISIFICHA.pateinter with thisform.txtpateinter.value
Repla VISIFICHA.mateinter with thisform.txtmateinter.value
CASE thisform.label8.caption="MODIFICA"
Select VISIPADRON
GO RECNO()
thisform.grid1.Columns(1).SetFocus()
Repla VISIPADRON.nombres with thisform.txtnombres.value
Repla VISIPADRON.Apepat with thisform.txtApepat.value

Repla VISIPADRON.Apemat with thisform.txtApemat.value


Repla VISIPADRON.telefono with thisform.txttelefono.value
Repla VISIPADRON.documento with thisform.combo1.value
Repla VISIPADRON.codigo with thisform.txtcodigo.value
Repla VISIPADRON.estadocivil with thisform.combo2.value
Repla VISIPADRON.gradoinstruc with thisform.combo3.value
Repla VISIPADRON.sexo with thisform.txtsexo.value
Repla VISIPADRON.profesion with thisform.txtprofesion.value
Repla VISIPADRON.documinterno with thisform.txtcodinterno2.value
Repla VISIPADRON.parentesco with thisform.combo4.value
Repla VISIPADRON.fechanacim with thisform.txtfechanacim.value
Repla VISIPADRON.ingresamas with thisform.edtingresamas.value
Repla VISIPADRON.observado with thisform.edtobservado.value
Repla VISIPADRON.direccion with thisform.txtDireccion.value
Repla VISIPADRON.codinterno with thisform.txtcodinterno.value
Repla VISIPADRON.nominterno with thisform.txtnominterno.value
Repla VISIPADRON.pateinter with thisform.txtpateinter.value
Repla VISIPADRON.mateinter with thisform.txtmateinter.value
Repla VISIPADRON.pabellon with thisform.txtpabellon.value
Repla VISIPADRON.ala with thisform.txtala.value
Repla VISIPADRON.piso with thisform.txtpiso.value
Repla VISIPADRON.delitogene with thisform.combo5.value
Repla VISIPADRON.delitoespe with thisform.combo6.value
Repla VISIPADRON.situajuridi with thisform.combo7.value
Repla VISIPADRON.sancionado with thisform.txtsancionado.value
Repla VISIPADRON.observainter with thisform.edtobservainter.value
Repla VISIPADRON.region with thisform.combo8.value
Repla VISIPADRON.epenal with thisform.combo9.value
Repla VISIPADRON.numerodoc with thisform.txtnumerodoc.value
Repla VISIPADRON.fotovisita with thisform.text4.value
Repla VISIPADRON.fotointerno with thisform.text5.value
Repla VISIPADRON.ruta with thisform.text6.value
wait window "Enlazando..." timeout(0.25)
Select VISIFICHA
Repla VISIFICHA.codigo with thisform.txtcodigo.value
Repla VISIFICHA.numerodoc with
thisform.txtnumerodoc.value
Repla VISIFICHA.nombres with thisform.txtnombres.value
Repla VISIFICHA.Apepat with thisform.txtApepat.value
Repla VISIFICHA.Apemat with thisform.txtApemat.value
Repla VISIFICHA.telefono with thisform.txttelefono.value
Repla VISIFICHA.documento with thisform.combo1.value
Repla VISIFICHA.direccion with thisform.txtDireccion.value
Repla VISIFICHA.codinterno with thisform.txtcodinterno.value
Repla VISIFICHA.nominterno with
thisform.txtnominterno.value
Repla VISIFICHA.pateinter with thisform.txtpateinter.value
Repla VISIFICHA.mateinter with thisform.txtmateinter.value
ENDCASE
endif
thisform.refresh
AHORA SI TIENES IMGENES O FOTOS EN TUS FORMATOS TAL COMO PUEDES OBSERVAR EN
ESTE EJEMPLO, PUES SIMPLEMENTE DEBES EMPELAR VARIABLES DE LOCALIZACION A FIN
DE NO TENER CAMPOS EN FORMATO GENERAL O DE IMGENES, LO CUAL AYUDARA A
LOCALIZAR MEDIANTE ARCHIVOS EN CUALQUIER FORMATO ACTIVARLOS DESDE UNA
PENTIUM I HASTA UNA PC PENTIUM IV
LO CUAL DURANTE MIS 15 AOS DE EXPERIENCIA HE PODIDO COMPROBAR QUE LA MAYORIA
UTILIZA CAMPOS DE FORMATO GENERAL POR LO QUE NO ES ACONSEJABLE PARA INSERTRA
IMGENES EN UNA BASE DE DATOS EN SQL O CUALQUIER TIPO YA QUE ESTAS OCUPAN
MUCHOS ESPACIOS EN EL DISCO

.AHORA AH TE ENVIO EN LA PARTE SUPERIOR COMO DEFINIMOS A UNA IMAGEN, CUYA RUTA
LA DEFINIMOS CON LOS COMANDOS SYS( )
thisform.text6.value= Sys(5)+Sys(2003)
Y ASI ESTA SE PODRAN MOSTRAR CUANDO TENGAS TUS IMGENES INSERTADAS EN UN
DETERMINADO REGISTRO.
ESPERO TE HAYA SERVIDOR DE AYUDA.
Atte.
CESAR PEREDA
gunepereda@gmail.com

DIOS BENDIGA.

También podría gustarte