Re: CREATE OBJECT by Zeke
Zeke
Wed Aug 17 02:48:24 CDT 2005
"Armando villa" <Armandovilla@discussions.microsoft.com> wrote in message
news:029A4F01-3F2A-43DC-8BB9-9C6136E56B25@microsoft.com...
>I develop application in vfp9 using the command CREATE OBJECT for link ole
> application and work fine with EXCEL, WORD and PP, but i cant do the same
> to
> link with WORDPAD or NOTEPAD, i will appreciate if could help to to fix
> these
> problem.
> Thanks.
Try using the Foundation Class Shell Execute or use a shellexec function
like the following:
*!* Function ShellExec
Lparameter lcLink, lcAction, lcParms
lcAction = Iif(Empty(lcAction), "Open", lcAction)
lcParms = Iif(Empty(lcParms), "", lcParms)
Declare Integer ShellExecute ;
In SHELL32.Dll ;
Integer nWinHandle, ;
String cOperation, ;
String cFileName, ;
String cParameters, ;
String cDirectory, ;
Integer nShowWindow
Declare Integer FindWindow ;
In WIN32API ;
String cNull,String cWinName
Return ShellExecute(FindWindow(0, _Screen.Caption), ;
lcAction, lcLink, ;
lcParms, Sys(2023), 1)