Solved

changing wallpaper at windows boot

Posted on 1998-06-19
6
141 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
ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

 

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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to debug this code 7 61
using web browser with BING 40 120
fso.FolderExists("\\server\HiddenFolder$") 4 65
VB6 - Scroll Mouse wheel on Picturebox 13 44
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

770 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