• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 537
  • Last Modified:

Change a button image/picture box image when mouse enter

Dear EE,

I want to created my own buttons for my applications,
and I want it when I mouseEnter in a image, it will change to another image...
How can I do that?

I tried this but it fails :(

 Private Sub picBtnFTP_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles picBtnFTP.MouseEnter

        Dim pPath As String
        pPath = AppPath() & "\1.jpg"
        Me.picBtnFTP.Image.FromFile(pPath)


    End Sub


How can I change that?
If possible easier than I can just change the opacity instead of another image, can save more resources...
Thanks you
0
joely2k
Asked:
joely2k
1 Solution
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Something like this will work:

    Private Sub picBtnFTP_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles picBtnFTP.MouseEnter

        Dim pPath As String
        pPath = Application.StartupPath & "\1.jpg"
        picBtnFTP.Image = Image.FromFile(pPath)

    End Sub

~IM
0
 
joely2kAuthor Commented:
Thanks Idle Mind for your help.....
Appreciated..
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now