RE:Le erré en el título anterior!!
Amiga María Claudia :
Si lo que deseas crear es lo que algunos conocemos como ATAJOS entonces puesdes adaptar lasiguiente rutina a tus necesidades...
PROCEDURE KeyPress
LPARAMETERS nKeyCode, nShiftAltCtrl
DO CASE
CASE nKeyCode = -7 && Tecla F8
DO FORM "C:\CONTROL\APLICACION\NOMBYEAR.SCX"
CASE nKeyCode = -9 .OR. nKeyCode = 28 && Tecla F10 o F1
WAIT WINDOW "La Tecla fue Desactivada." NOWAIT
?? CHR(7)
MESSAGEBOX("La Tecla esta Desactivada",4+18,"Aviso")
CASE nKeyCode = -5 && Tecla F6
Thisform.Confirmo()
ENDCASE
O Simplemente asignas la tecla de funcion que Desees.
* ON KEY LABEL F5 DO CONFIRMO **
Para Evitar abrir un formulario mas de una vez
Prueba lo siguiente , ponelo en el Init del formulario :
Espero que te sirva.
************************************
LOCAL i, lcWindName, llRetVal
* Initialize the variables. llRetval returns a .F. from the INIT() if
* the form is already visible. Returning a .F. from any INIT() causes
* the object to not be created.
* i contains the number of instances of the form.
* lcWindName contains the name of the form you're looking at.
llRetVal = .T.
i = 0
lcWindName = WCHILD("",0) && The "" must be a NULL or empty string
* Loop through all open forms, and see if we have any that have the same
* name as the one you want to open. (It exists in INIT() but is not yet available.)
DO WHILE !EMPTY(lcWindName)
IF lcWindName = UPPER(this.name)
i = i + 1
IF i > 1
llRetVal = .F.
EXIT
ENDIF
ENDIF
lcWindName = WCHILD("",1) && The "" must be a NULL or empty string
ENDDO
IF !llRetVal
MESSAGEBOX('VENTANA ACTUALIZACION DE CLIENTES YA ACTIVA' + ;
+CHR(13)+'VERIFIQUE QUE
NO ESTE MINIMIZADA',48,"Avido del Sistema")
ENDIF
RETURN llRetVal
o tambien :
Puedes utilizar SKIP FOR al definir el menú
DEFINE BAR 1 OF demo PROMPT "Mi opción de menu" SKIP FOR
wexist('MiFormulario')
Bueno amiga espero haber respondido a tus preguntas.
Saludos,
GABRIEL
(Lima-Perú)