mer. 20 juin 2012, 18h43
Gregory
atoutfox.public.association
Re: Probleme avec ShellExecute et fichier .jpg
Une idee ? Aucune, j'ai le meme probleme - sauf
?shellexecute(GetDesktopWindow(), 'open', 'c:\windows\system32\mspaint.exe',
'd:\tmp\1pic\visa.jpg', null, 1)
ou
oshell = CREATEOBJECT("Shell.Application")
?oshell.ShellExecute( 'd:\tmp\1pic\visa.jpg')
______
Gregory
______
"Francis Faure" wrote in message news:jrssh2$qnh$1@news.niouzes.net...
Bonsoir
sur un windows 7 - 32bits
- un doule clic dans explorer lance bien les JPG dans ms paint
mais
- un shell execute ne lance pas le paint avec le JPG dedans
alors que c'est OK pour XL, DOC, PDF ....
le code d'erreur de retour est bien
31 - No application associated with file name extension or file is not
printable
Une idée ?
Merci
Cordialement
exemple de code pour reproduire
? Ouvrir_Document("c:\temp\ff.jpg") && pas ok : retour 31
* 31 - No application associated with file name extension or file is not
printable
Function Ouvrir_Document(lsLeDocument) && retour >32 si ok
Declare Integer ShellExecute In shell32.Dll ;
Integer hndWin, ;
STRING cAction, ;
STRING cFileName, ;
STRING cParams, ;
STRING cDir, ;
INTEGER nShowWin && 3=SW_SHOWMAXIMIZED
IF FILE(m.lsLeDocument)
return ShellExecute(0, "open", m.lsLeDocument, "", "", 3)
ELSE
=Messagebox("Le document : "+m.lsLeDocument+" n'a pas été trouvé.",0+48)
RETURN 2 && "The specified file was not found.
endif
Endfunc
Permalink : http://www.atoutfox.org/nntp.asp?ID=0000009277