[RESOLVED] Background Image Problem
I am having problems with the following code. I want to make it so that when the user hovers over the button, the background image changes. Any help is appreciated. Thanks.
VB Code:
Private Sub btnUpload_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.MouseHover
Dim strBg As Image
strBg = Application.StartupPath & "\btnbg.jpeg"
btnUpload.BackgroundImage = strBg
End Sub
Re: Background Image Problem
You're declaring strBg as an image, but you're setting it to a string. You need to do something like:
VB Code:
Dim imgPath As System.Drawing.Image = Image.FromFile("C:\Whatever.gif")
PictureBox1.Image = imgPath
Edit* for accuracy's sake ;D
Re: Background Image Problem