Solved

changing wallpaper at windows boot

Posted on 1998-06-19
6
139 Views
Last Modified: 2012-05-04
i've recently made a program that randomly selects a wallpaper from an assigned directory and makes it the
desktop wallpaper. when i made a shortcut to this program
and put it in the startup folder...windows failed to load,
because it didn't like my program messing with the registry,
while it was trying to load windows. my solution was to pause loading of my program for 2 seconds. my question is...
is there a better solution? will it work for everyone? i'm planning to make this program universally usable for win95 and wanna make it safe for everyone to use. thanks :)
0
Comment
Question by:mwam
  • 3
  • 3
6 Comments
 
LVL 6

Accepted Solution

by:
clifABB earned 50 total points
ID: 1463767
I, too, have a program that does the same thing.  A shortcut is placed in the startup folder, and everything works well.  The only difference is that I'm not changing the registry directly.  I'm changing it through SystemParametersInfo()

Here is (part) of my code (sFile is the name of the bitmap):

Decalares:
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Const SPI_SETDESKWALLPAPER = 20
Private Const SPIF_UPDATEINIFILE = &H1
Private Const SPIF_SENDWININICHANGE = &H2

Code:
lRes = SystemParametersInfo(SPI_SETDESKWALLPAPER, _
                            0&, _
                            sFile, _
                            SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)

0
 

Author Comment

by:mwam
ID: 1463768
how do  i make it not tiled?
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1463769
I will have to give you that information on Monday.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:mwam
ID: 1463770
ok...thanks :)
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1463771
I'm sorry, but I have been unable to find any information on how to turn off the wallpaper's tiled attribute (other than doing so by right clicking on the desktop and selecting 'Properties').
0
 

Author Comment

by:mwam
ID: 1463772
ok...thanks for trying

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now