Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to show jpg file in x64 windows
Message
 
À
18/11/2010 10:41:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Divers
Thread ID:
01489593
Message ID:
01489608
Vues:
110
>I'm using code below to show jpg files.
>In 64 bit windows it does not open image. shellexecute returns error
>code 31 There is no program associated with this file type
>
>I also tried RUN pbrush c:\images\myimage.jpg but this returns error that pbrush is non-existing command.
>Clicking in jpg image in windows explorer opens image with paintbrush properly.
>
>How to show jpg image in 64-bit windows from VFP application ?
>
>
>FUNCTION SHELLEXE( MonURL)
>
>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
>
>local lnRes
>lnRes=ShellExecute(FindWindow( 0, _SCREEN.CAPTION), "Open", MonURL, "", ;
> m.tempdir+'\', 1)
>return lnRes


These work for me:
? ShellExecute(0,"open","c:\windows\system32\mspaint.exe","D:\software\smlogo.jpg","",1)
? ShellExecute(0,"open","c:\windows\sysWOW64\mspaint.exe","D:\software\smlogo.jpg","",1)
Good Luck
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform