← Foro de Visual FoxPro

Como llamar archivos desde VFP

Hilo en el foro de Visual FoxPro · 02 de Abril del 2003 · 2 respuestas
Cyber coca02 de Abril del 2003
Pregunta
Necesito que alguien me explique como puedo hacer lo siguiente: necesito saber como llamar un archivo de cualquier extension desde un boton por ejemplo el boton: "ejecutar examen" cuando presione click me abra el documento que ya cree "examen.doc" es urgente ayuda porfavor!!!

Respuestas 2

mariolo02 de Abril del 2003
DECLARE INTEGER ShellExecute IN SHELL32 INTEGER hwnd, STRING cOP, STRING cFile, STRING cParams, STRING cStartDir, INTEGER nShowCmd
DECLARE INTEGER GetDesktopWindow IN User32

LOCAL cFile, nWhnd, cStartPath, nx

cFile=\'Examen.doc\'
IF FILE(cFile)
nWhnd=GetDesktopWindow()
cStartPath=ADDBS(JUSTPATH(cFile))
nResult=ShellExecute(nWhnd, \'OPEN\', cFile, \'\', cStartPath, 1)
ENDIF
Cyber coca02 de Abril del 2003
DECLARE INTEGER ShellExecute IN SHELL32 INTEGER hwnd, STRING cOP, STRING cFile, STRING cParams, STRING cStartDir, INTEGER nShowCmd
DECLARE INTEGER GetDesktopWindow IN User32

LOCAL cFile, nWhnd, cStartPath, nx

cFile=\\'Examen.doc\\'
IF FILE(cFile)
nWhnd=GetDesktopWindow()
cStartPath=ADDBS(JUSTPATH(cFile))
nResult=ShellExecute(nWhnd, \\'OPEN\\', cFile, \\'\\', cStartPath, 1)
ENDIF
¿Buscas más hilos como este? Mira el foro de Visual FoxPro o usa el buscador.