I've got a program which works on a time, it selects a image at random froma list.
IE: Dim FileDet As String = "C:\Desktop\Photos\pic1.jpg"
How can i get VB.Net to change this as much background image????
Printable View
I've got a program which works on a time, it selects a image at random froma list.
IE: Dim FileDet As String = "C:\Desktop\Photos\pic1.jpg"
How can i get VB.Net to change this as much background image????
Hi,Quote:
Originally Posted by kiwis
You want that every time the random choose picture the background picture changes in the choosen picture.
Wkr,
sparrow1
Yes that's right
Hi,Quote:
Originally Posted by kiwis
What do you have so far?
wkr,
sparrow1
I don't have a clue where to start?
Hi,
What is the version your working with.
Wkr,
sparrow1
2005
Hi,
I created somecode.
It's possible that there's a better way but it works.
It's very late this time of day , so I 'm very tired and wants to go to sleep :cry:
But anyway you can tried it this way:
Wkr,Code:Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Start() ' timer set to 5000 or the time needed to change
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Static Dim Image As Integer
Select Case Image
Case 0
Me.BackgroundImage = My.Resources.name of the image
Image += 1
Case 1
Me.BackgroundImage = My.Resources.name of the image
Image = 0
End Select
End Sub
sparrow1
Thanks but I mean my desktop background
This might be useful:
http://www.devx.com/tips/Tip/21380
Thanks, also how could I get the file location from my current wallpaper image?
Hi,Quote:
Originally Posted by kiwis
Do you mean that you want to create a Screensaver.
Wkr,
sparrow1
I'm i'm making a program which uses selected files to changed my wallpaper every so often (set by a timer event)
I really need to know two things
1. How to set a image as a wallpaper
2. How to get the details of the current wallpaper