Article View: borland.public.cppbuilder.nativeapi
Article #15930Re: Screen Saver!
From: Remy Lebeau (TeamB)
Date: Sun, 08 Jun 2003 23:15
Date: Sun, 08 Jun 2003 23:15
35 lines
1794 bytes
1794 bytes
"Safari" <Safari@alloymail.com> wrote in message
news:3ee3bf50@newsgroups.borland.com...
> How can i call Screen Saver Setting?
What do you mean exactly? Please clearify.
> ShellExecute(Handle, "OPEN", ("RunDLL32.exe").c_str()
<snip>
You are misusing the c_str() method in the third parameter. c_str() is a
method of the AnsiString class, but you are not actually using AnsiString
for that parameter at all.
The call should be more like this instead (assuming FileName is an
AnsiString):
ShellExecute(Handle, "open", "RunDLL32.exe",
("Desk.cpl,InstallScreenSaver " + FileName + " /S").c_str(), NULL,
SW_NORMAL);
Or better:
AnsiString params = ("Desk.cpl,InstallScreenSaver \"" + FileName + "\"
/S");
ShellExecute(Handle, "open", "RunDLL32.exe", params.c_str(), NULL,
SW_NORMAL);
> Error!
What is the exact error you are seeing?
Gambit
Technical Details
Message-ID:
<3ee3c2da$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3ee3bf50@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,aeab6fd0c8a4fd7 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-08 16:16:08 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3ee3bf50@newsgroups.borland.com> Subject: Re: Screen Saver! Date: Sun, 8 Jun 2003 16:15:48 -0700 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3ee3c2da$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1055113946 207.175.226.26 (8 Jun 2003 16:12:26 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail