Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Changing wallpaper

Posted on 1999-07-09
4
Medium Priority
?
202 Views
Last Modified: 2010-04-06
I made a small program that will change wallpaper randomly when windows starts. I put the program in Run-section in the registry. Now when windows starts, it will change wallpaper, but before it does it I can still see the old wallpaper.

How can I change the wallpaper on start-up without seeing old wallpaper?
0
Comment
Question by:tonitop
[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
4 Comments
 
LVL 13

Expert Comment

by:Epsylon
ID: 1387474
Use this:

  SystemParametersInfo(SPI_SETDESKWALLPAPER,
                       0,
                       PChar('Image.bmp'),
                       SPIF_SENDWININICHANGE);

Cheers,

Epsylon.

0
 

Author Comment

by:tonitop
ID: 1387475
I already know how to change wallpaper, but when I run my program (I have it in windows registry under Run-section) it changes wallpaper after start-up, so I can still see the old wallpaper when windows starts. If there a way to change the wallpaper on start-up so that it would be changed before I can see my desktop?
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1387476
Change it when windows shuts down....
0
 
LVL 15

Accepted Solution

by:
simonet earned 200 total points
ID: 1387477
Unless you're doing like Epsylon suggested, then the answer is "NO". That's because the desktop (EXPLORER.EXE) is loaded and run before any other applications.

You can try loading your application as a service, by placing it in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices

There's a chance services are loaded before other applications are, but I cannot asure you that services are loaded before the desktop. Anyway it's worth a try.

If that doesn't work, then changing the wallpaper right before Windows shutdown is the only possible solution.

yours,

Alex
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

722 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