Article View: borland.public.cppbuilder.internet.web
Article #744Re: Bad ShellExecute for new
From: Mark Jacobs
Date: Mon, 06 Mar 2006 11:27
Date: Mon, 06 Mar 2006 11:27
21 lines
1851 bytes
1851 bytes
"Artaud" <artaud.patrick@wanadoo.fr> wrote in message news:43e93f94$1@newsgroups.borland.com... > Hello, > I try to open an html file wiith the shellExecute method but I obtain > nothing. > This is my code: > //---------------------------- > AnsiString chem; > chem=ExtractFilePath(Application->ExeName)+"aide\\sommaire.html"; > ShellExecute(0,"open",chem.c_str(),NULL,NULL,SW_SHOWNORMAL); > //------------------------------------------------------------ > and when I click directly on the file it opens IE correctly > the folder "aide " is in the running directory Because the html file you are trying to open is *not* in the same dirtectory as your application, or the Application->ExeName has no path on it (ShowMessage it to see), and you should be using ParamStr(0) instead. HTH, -- Mark Jacobs DK Computing http://www.dkcomputing.co.uk
Technical Details
Message-ID:
<440c1c4e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<43e93f94$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,5cff43ecf81dd1ac X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Mark Jacobs" <http://www.jacobsm.com/mjmsg?Borland%20Newsgroup> Newsgroups: borland.public.cppbuilder.internet.web References: <43e93f94$1@newsgroups.borland.com> Subject: Re: Bad ShellExecute for new Date: Mon, 6 Mar 2006 11:27:34 -0000 Lines: 23 Organization: DK Computing X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 81.144.157.8 Message-ID: <440c1c4e@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1141644366 81.144.157.8 (6 Mar 2006 03:26:06 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail