Solved

changing wallpaper at windows boot

Posted on 1998-06-19
6
145 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
[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
  • 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
Technology Partners: 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!

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month7 days, 20 hours left to enroll

617 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