?
Solved

Set wallpaper

Posted on 1999-06-22
3
Medium Priority
?
248 Views
Last Modified: 2010-04-06
How do I set the wallpaper in windows in a "professional" way? I want to be able to choose alignment and tile on/of etc.
0
Comment
Question by:jonassondaniel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1384010
hi, j.
try this:

procedure ChangeWallpaper(BmpName: string; Tile: Boolean);
var
  Reg: TRegIniFile;
begin
  Reg := TRegIniFile.Create('Control Panel');
  Reg.WriteString('desktop', 'Wallpaper' ,BmpName);
  if tile then
    Reg.WriteString('desktop', 'TileWallpaper', '1')
  else
    Reg.WriteString('desktop', 'TileWallpaper', '0');  
  Reg.Free;
  SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, nil, SPIF_SENDWININICHANGE);
end;

& then call

ChangeWallpaper('C:\LOGO.BMP' , False);
0
 

Author Comment

by:jonassondaniel
ID: 1384011
thanks, blackdeath. it works nicely. Please "propose answer" so I can reward you.
0
 
LVL 1

Accepted Solution

by:
BlackDeath earned 80 total points
ID: 1384012
ok, thanx.
bye,
BlackDeath.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question