Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print bmp file
Message
 
À
29/12/2004 01:22:48
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00972617
Message ID:
00973142
Vues:
14
>Dear sir,
>I copy your code and run, but not success.
>
>Please advise.
>
Derek,

There're a couple of possibilities. One would be that there's no application associated with the bmp extension. The other is that you're using a long file name (LFN) with spaces. Try this
DECLARE INTEGER ShellExecute IN Shell32.DLL;
  INTEGER hwnd, STRING @lpOperation,;
  STRING @lpFile, STRING @lpParameters,;
  STRING @lpDirectory, INTEGER nShowCmd
lcfile = 'c:\mydir\mybmp.bmp'
lcpath = JUSTPATH(lcfile)
lcop = 'print'
lnerr = ShellExecute(0, @lcop, @lcfile, 0, @lcpath, 0)
IF lnerr < 33 THEN
  ? lnerr
ENDIF
If the value is 2, then it's probably an LFN problem. In this case, I try
lcfilename = [ + lcfilename + ]
This should enclose the LFN in quotes which should resolve the problem.

If the value isn't 2, let me know what it is.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform