Codigos Para Botones De Comando

Páginas: 11 (2643 palabras) Publicado: 4 de octubre de 2012
CODIGOS PARA BOTONES DE COMANDO

BOTON DE COMANDO: ALTAS PROCEDIMIENTO:CLICK


*deshabilitamos el objeto del numero de control
thisform.txtncontrol.enabled = .t.
*enviamos el enfoque al objeto del numero de control
thisform.txtncontrol.setfocus
*limpiamos todos los objetos
thisform.txtncontrol.value = 0
thisform.txtnombre.value = ''
thisform.txtTURNO.value = ''thisform.txtPeriodo.value = ''
thisform.opgsexo.fem.value = 0
thisform.opgsexo.mas.value = 0
thisform.chks1.value = 0
thisform.chks2.value = 0
thisform.chks3.value = 0
thisform.chks4.value = 0
thisform.chks5.value = 0
thisform.chks6.value = 0
thisform.txtgrupo.value = ''
*desabilitamos las opciones que no necesitamos en esta operación
Thisform.altas.enabled = .f.
thisform.bajas.enabled = .f.thisform.consultas.enabled = .f.
thisform.cambios.enabled = .f.
thisform.actualizar.enabled = .f.
thisform.imprimir.enabled = .f.
*habilitamos los objetos necesarios
thisform.cancelar.enabled = .t.
thisform.guardar.enabled = .t.






















CUADRO DE TEXTO:TXTNCONTROL PROCEDIMIENTO: KEYPRESS
LPARAMETERS nKeyCode, nShiftAltCtrl
if nkeycode = 13 or nkeycode = 9thisform.txtnombre.setfocus
thisform.txtnombre.enabled = .t.
thisform.txtnombre.value = ''
endif

CUADRO DE TEXTO:TXTNOMBRE PROCEDIMIENTO: KEYPRESS
LPARAMETERS nKeyCode, nShiftAltCtrl
if nkeycode = 13 or nkeycode = 9
thisform.CBOESPECIAL.setfocus
thisform.CBOESPECIAL.enabled = .t.
endif

COMBOBOX:CBOESPECIAL PROCEDIMIENTO:LOSTFOCUS
THISFORM.TXTTURNO.SETFOCUSTHISFORM.TXTTURNO.ENABLED=.T.
THISFORM.TXTTURNO.VALUE = ' '

CUADRO DE TEXTO:TXTTURNO PROCEDIMIENTO: KEYPRESS
LPARAMETERS nKeyCode, nShiftAltCtrl
IF NKEYCODE = 9 OR NKEYCODE = 13
THISFORM.TXTGRUPO.SETFOCUS
THISFORM.TXTGRUPO.ENABLED = .T.
THISFORM.TXTGRUPO.VALUE = ' '
ENDIF

CUADRO DE TEXTO:TXTGRUPO PROCEDIMIENTO: KEYPRESS
LPARAMETERS nKeyCode, nShiftAltCtrl
if nkeycode = 13 or nkeycode = 9thisform.txtPERIODO.setfocus
thisform.txtPERIODO.enabled = .t.
thisform.txtPERIODO.value = ''
endi

CUADRO DE TEXTO:TXTPERIODO PROCEDIMIENTO: KEYPRESS
LPARAMETERS nKeyCode, nShiftAltCtrl
if nkeycode = 13 or nkeycode = 9
thisform.OPGSEXO.FEM.setfocus
thisform.opgsexo.fem.enabled = .T.
thisform.opgsexo.mas.enabled = .T.
thisform.chks1.enabled = .T.
thisform.chks2.enabled = .T.thisform.chks3.enabled = .T.
thisform.chks4.enabled = .T.
thisform.chks5.enabled = .T.
thisform.chks6.enabled = .T.
endif







CASILLA DE VERIFICACION:CHKS1 PROCEDIMIENTO: CLICK
THISFORM.IMPRIMIR.ENABLED = .T.
thisform.chks2.value = 0
thisform.chks3.value = 0
thisform.chks4.value = 0
thisform.chks5.value = 0
thisform.chks6.value = 0
CASILLA DE VERIFICACION:CHKS2PROCEDIMIENTO: CLICK
THISFORM.IMPRIMIR.ENABLED = .T.
thisform.chks1.value = 0
thisform.chks3.value = 0
thisform.chks4.value = 0
thisform.chks5.value = 0
thisform.chks6.value = 0
CASILLA DE VERIFICACION:CHKS3 PROCEDIMIENTO: CLICK
THISFORM.IMPRIMIR.ENABLED = .T.
thisform.chks1.value = 0
thisform.chks2.value = 0
thisform.chks4.value = 0
thisform.chks5.value = 0
thisform.chks6.value = 0CASILLA DE VERIFICACION:CHKS4 PROCEDIMIENTO: CLICK
THISFORM.IMPRIMIR.ENABLED = .T.
thisform.chks1.value = 0
thisform.chks2.value = 0
thisform.chks3.value = 0
thisform.chks5.value = 0
thisform.chks6.value = 0
CASILLA DE VERIFICACION:CHKS5 PROCEDIMIENTO: CLICK
THISFORM.IMPRIMIR.ENABLED = .T.
thisform.chks1.value = 0
thisform.chks2.value = 0
thisform.chks3.value = 0
thisform.chks4.value = 0thisform.chks6.value = 0
CASILLA DE VERIFICACION:CHKS6 PROCEDIMIENTO: CLICK
THISFORM.IMPRIMIR.ENABLED = .T.
thisform.chks1.value = 0
thisform.chks2.value = 0
thisform.chks3.value = 0
thisform.chks4.value = 0
thisform.chks5.value = 0


















BOTON DE COMANDO: CANCELAR PROCEDIMIENTO:CLIC
*limpiamos todos los objetos
thisform.txtncontrol.value = 0...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Codigos De Vb Para Botones De Navegacio
  • Como crear un boton para imprimir en VB
  • Como crear un Boton de Apagado para Windows 8
  • Boton De Comando
  • Como tocar el acordeón de botones
  • Como crear botones en flash
  • Cuales Son Los Botones Para Rectificar Un Doc
  • Programación En Botones Para Vb

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS