ATOUTFOX COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO Visual FoxPro : le développement durable |
|||||||||||||
|
|||||||||||||
SET DEFAULT au menu |
|||||||||||||
|
|||||||||||||
www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2024. |
Petite correction :
Remplacez les lignes suivantes :
ON SELECTION POPUP dynamicite DO takeaction IN "c:\test\menu\menu.prg" WITH PROMPT()
PROCEDURE takeaction(cPrompt)
IF Cprompt = "Mise à jour du menu"
DO c:\test\menu\menu.prg
ELSE
SET DEFAULT TO _vfp.Projects(1).HomeDir
WAIT WINDOW _vfp.Projects(1).HomeDir NOWAIT
ENDIF
ENDPROC
PAR :
ON SELECTION POPUP dynamicite DO takeaction IN SYS(2004)+"\menu.prg" WITH PROMPT()
PROCEDURE takeaction(cPrompt)
IF Cprompt = "Mise à jour du menu"
DO SYS(2004)+"\menu.prg"
ELSE
SET DEFAULT TO SUBSTR(cprompt,AT("-",cprompt)+2)
WAIT WINDOW SUBSTR(cprompt,AT("-",cprompt)+2) NOWAIT
ENDIF
ENDPROC
Ainsi si vous avez plusieurs projets ouverts, vous pouvez changer le "SET DEFAULT" sans effort.