Thread View: borland.public.cppbuilder.internet.web
6 messages
6 total messages
Started by Artaud
Wed, 08 Feb 2006 00:50
Bad ShellExecute for new
Author: Artaud
Date: Wed, 08 Feb 2006 00:50
Date: Wed, 08 Feb 2006 00:50
14 lines
1539 bytes
1539 bytes
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 Could you help me please?Is tere another way?Where must I look? I thank you very much Patrick
Re: Bad ShellExecute for new
Author: Remy Lebeau (TeamB)
Date: Wed, 08 Feb 2006 02:35
Date: Wed, 08 Feb 2006 02:35
20 lines
1434 bytes
1434 bytes
"Artaud" <artaud.patrick@wanadoo.fr> wrote in message news:43e93f94$1@newsgroups.borland.com... > I try to open an html file wiith the shellExecute method but I obtain > nothing. What is the return value of ShellExecute()? What is the return value of GetLastError()? > 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 Did you verify in the Registry that the "open" verb is actually registered for the ".htm" file extension? Gambit
Re: Bad ShellExecute for new
Author: Artaud
Date: Wed, 08 Feb 2006 08:09
Date: Wed, 08 Feb 2006 08:09
28 lines
1919 bytes
1919 bytes
Thank you at you I'll looked at all thank you again Patrick "Remy Lebeau (TeamB)" <no.spam@no.spam.com> a οΏ½crit dans le message de news: 43e958f5$1@newsgroups.borland.com... > > "Artaud" <artaud.patrick@wanadoo.fr> wrote in message > news:43e93f94$1@newsgroups.borland.com... > >> I try to open an html file wiith the shellExecute method but I obtain >> nothing. > > What is the return value of ShellExecute()? What is the return value of > GetLastError()? > >> 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 > > Did you verify in the Registry that the "open" verb is actually registered > for the ".htm" file extension? > > > Gambit > >
Re: Bad ShellExecute for new
Author: caleb
Date: Wed, 08 Feb 2006 11:01
Date: Wed, 08 Feb 2006 11:01
16 lines
1285 bytes
1285 bytes
"Artaud" <artaud.patrick@wanadoo.fr> wrote: >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); does chem look ok? do you need +"\\aide\\som...? also I think you can get a result code from shellexecute
Re: Bad ShellExecute for new
Author: Remy Lebeau (TeamB)
Date: Wed, 08 Feb 2006 18:52
Date: Wed, 08 Feb 2006 18:52
12 lines
1236 bytes
1236 bytes
"caleb" <no@spam.com> wrote in message news:43e9dd80$1@newsgroups.borland.com... > does chem look ok? > > do you need +"\\aide\\som...? ExtractFilePath() always returns the trailing backslash. Gambit
Re: Bad ShellExecute for new
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads