Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

From VFP How Do I View A TIF Image in Microsoft Document Imaging? 1

Status
Not open for further replies.

jbailey268

Programmer
May 25, 2005
51
US
RUN MSPVIEW.EXE -f W:\ImageArchive\12037292.tif
does not work.
In the operating system if I just double click the file it launches. Is there a way perhaps using shell execute that can do this.

I have to launch it from VFP 8 when a user clicks a button.

In my computer it seems to be in c:\program files\common files\microsoft shared\mspaper along with MSPVWCTL.OCX

Thanks in advance for any help or direction.
 
Hi JBailey,

Yes, you can do this with ShellExecute().

Code:
DECLARE INTEGER ShellExecute IN shell32.dll ; 
  INTEGER hndWin, ; 
  STRING cAction, ; 
  STRING cFileName, ; 
  STRING cParams, ;  
  STRING cDir, ; 
  INTEGER nShowWin

cFileName = "W:\ImageArchive\12037292.tif" 
cAction = "open" 
ShellExecute(0,cAction,cFileName,"","",1)

For more information about ShellExecute(), see
Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks for the quick response - as usual.

Works great!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top