Re: Background picture for Delphi windows

Posted by WAllison:

In Reply to: Background picture for Delphi window posted by JiiPee:

: How can I change the windows background picture by clicking a button? Picture would be etc. pic1.bmp. I just need a simple code!

Here's the win32 basics :

procedure ChangeDesktop(Filename: string);
var lpBuffer: Array [0..MAX_PATH] of Char;
  StrPCopy(lpBuffer, Filename);
  SystemParametersInfo(SPI_SETDESKWALLPAPER,0,@lpBuffer, 0);

I know this works i've tried it myself - I think it might need some work in registering the files but just look up SystemParametersInfo in Win32 help.

Related Articles and Replies

DelphiLand Discussion Forum