>George,
>
>I'm trying to RUN AutoDesk's AutoView to view CAD drawings. I am somewhat of a novice and can't find your suggestion documented. I need a little more info. What does the DECLARE INTEGER ... statement accomplish, the online documentation says it works the same as DIMENSION. Are these declarations supposed to match the parameters passed to ShellExecute? I'm assuming that the ShellExecute command is a routine that already exists. Where would I place this code - on the click event of a button, for example?
>
>Thanks for your help.
Tom,
The DECLARE syntax in this context is making a function from one of the Window's Dynamic Link Libraries (DLL files) available to VFP. This particular function is exactly the same on that Windows itself calls when you double click a file name in the Windows Explorer or File Manager. BTW, this is a good way to test if the code will meet your needs.
Probably the best place to place the declaration is in the .Init method of the form (You might want to issue CLEAR DLLS in .Destroy). Once the function is initialized it's available to any method that calls it. So the call to ShellExecute could be placed in the click event of a command button.
hth,
George
Ubi caritas et amor, deus ibi est