Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to change WallPaper ??

0 views
Skip to first unread message

Chow Hoi Ka, Eric

unread,
May 24, 1999, 3:00:00 AM5/24/99
to
Hello,

How can change the current WallPaper in Delphi and update it at once
????
It means that when I click the Button, the current WallPaper will be
changed at once ..


Best regards,
Eric


Lewis Howell

unread,
May 24, 1999, 3:00:00 AM5/24/99
to
This is from my Delphi Tip of the Day webpage at
http://members.truepath.com/delphi

From what I have been told, this does not work with ActivePage setup. You
will have to use the SystemParametersInfo() WIN32 API call sending in to
SPI_SETDESKWALLPAPER as the first parameter to tell windows we are changing
the wallpaper. The second parameter must be 0, the third is the name and
path of your bitmap, and the fourth is SPIF_SENDCHANGE.

{...}
procedure TForm1.Button1Click(Sender: TObject);
begin
SystemParametersInfo(SPI_SETDESKWALLPAPER,
0,
pChar('c:\windows\red blocks.bmp'),
SPIF_SENDCHANGE);
end;
{...}

--
--
Lewis Howell
lewis...@yahoo.com
Lou's Delphi Tip of the Day:
http://members.truepath.com/delphi
Lou's personal webpage:
http://members.truepath.com/LewisHowell

Chow Hoi Ka, Eric wrote in message <3748FE18...@sftw.umac.mo>...

0 new messages