🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.pascal.delphi.misc
2 messages
2 total messages Started by Chow Hoi Ka, Eric Mon, 24 May 1999 00:00
How to change WallPaper ??
#386
Author: Chow Hoi Ka, Eric
Date: Mon, 24 May 1999 00:00
10 lines
1133 bytes
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
Re: How to change WallPaper ??
#388
Author: Lewis Howell
Date: Mon, 24 May 1999 00:00
40 lines
1987 bytes
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
lewishowell@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.3FF7178D@sftw.umac.mo>...
>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
>
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