Autor Beitrag
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mi 30.08.06 12:00 
Da gewisse User in der Shoutbox fragen^^ hier die Lösung

Folgende Procedure ändert das Hintergrundbild des Desktops. Es muss der komplette Dateiname (inkl. Pfad) des Bildes übergeben werden:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure SetBackground(const AFilename: String);
begin
 if not SystemParametersInfo(SPI_SETDESKWALLPAPER,
                             0,
                             PChar(AFilename),
                             SPIF_SENDCHANGE OR SPIF_UPDATEINIFILE) then
   RaiseLastOSError;
End;


LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
teamrocket0
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 177
Erhaltene Danke: 1

Win ME, Win XP, Win 7, Win 10
Delphi 7, 10.2 Tokyo
BeitragVerfasst: Mi 07.02.07 14:20 
Hm. Irgendwie werde ich das Gefühl nicht los das er mich damit meinte!^^