Setting Background image in code

ryodoan

Well-known member
Joined
Jul 16, 2004
Messages
65
Location
Ohio
Programming Experience
3-5
I am completely lost when it comes to this... I just wanted to make a simple desktop image randomizer, but at the moment, I do not know how to even change the desktop image through code. If someone could help that would be great


(p.s. if there is a way to display system temp also it is for a totaly different project, but that would be cool if I could)
 
That looks a whole lot like what I saw in a VB 6.0 code, I will try it in a moment, but I have to finish getting ready for school, and then go there.

What does it mean by saying it is an API function?

by system temp I meant that since my computer has a thermometer I wanted to find out somehow the system temperature. But that was more just for fun than any real project.
 
API stands for application program interface. With windows, these are usually functions that the operating system uses like setting the desktop image, or power settings. Since the .NET framework does not support these functions with managed code, you have to use Windows API.

To do so, you define the function by showing the libraray (usually a dll) that contains the function and any parameters needed.
 
Back
Top