Hi Bob,
Thanks for the input, however, it still does not work.

The wallpaper is changed, but I have to press the F5 key to refresh the
screen so that I can see the changes :(

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Bob Swart
Sent: 08 December 2005 12:22
To: Borland's Delphi Discussion List
Subject: Re: Screen Refresh


Hi Chris,

> I wrote an application that changes a users screen when they logon.  The
app
> uses this API to refresh the screen :
>
> SystemParametersInfo(SPI_SETDESKWALLPAPER,0,Nil,SPIF_SENDWININICHANGE);

Instead of the "nil" parameter, I pass a PChar to a .bmp myself.

Here's my code that I use:

uses
   Windows;
const
   SPI_SETDESKWALLPAPER = 20;
begin
   SystemParametersInfo(SPI_SETDESKWALLPAPER, 0,
     PChar('c:\WINNT\D2006.bmp'), 0);
end.

This works for me (also on XP). So perhaps you need to pass a valid .bmp
file to update the desktop? (just an idea)

Groetjes,
           Bob Swart (aka Dr.Bob - www.DrBob42.com)

--
Bob Swart Training & Consultancy (eBob42) - Borland Technology Partner
Blog: http://www.drbob42.com/blog - RSS: http://drbob42.com/weblog.xml
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi




_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to