Solved

changing wallpaper at windows boot

Posted on 1998-06-19
6
144 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

752 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