-
Desktop Randomisation
This is probably a stupid question, so I thought I'd use my first post to ask it.
First some background info. I'm an IPT student and have had about a year's experience in Visual Basic, and currently own VB 6 Pro Edition.
Now the question. I want to write a program that, upon loading, will select a random picture for my desktop out of a declared folder. I know how to do the Form_Load and randomise parts, but I just need to know how I could actually apply what the program selects to my desktop.
It's not a major project, I know, but I'd just like to have such a program. Forgive me if it's a stupid question, but I've used the forum search tool and it turned up no results. Oh, there's not a question mark anywhere in this post. It's not a question, rather just a statement of what I'd like to know... Ah well.
-
In short you want to change the Wallpaper, yes?
-
If so, have a squiz here.
Bruce.
-
Thanks. I changed the dialogue filter to JPEG files (.jpg, .jpeg, .jpe, etc.), and the dialogue can read them, but it can't set them as wallpaper, and my desktop goes to the default blue. Can you tell me how to get around this?
-
I find that it behaves the same way when I try it. bmp works, jpg doesn't. That's no help I know, but at least you know it's not just you.
-
I just did some research on the web and apparently Active Desktop has to be on in order to programmatically set the wallpaper to a jpg file.
-
In addition to what Marty said, you could always convert your .jpg to .bmp (programatically). I mention this as I saw that
as a possible solution for a similar post.
Bruce.
-
Thanks, that oughtta do it.
-
just for extra clarity, active desktop has nothing to do with it
even windows simply converts the .jpg to a temporary .bmp and uses that, not the .jpg
so theres no way to get around it but convert the .jpg and use the .bmp