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
Solved

changing wallpaper at windows boot

Posted on 1998-06-19
6
142 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

856 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