Solved

Change a button image/picture box image when mouse enter

Posted on 2004-10-24
533 Views
Last Modified: 2007-12-19
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
Question by:joely2k
    2 Comments
     
    LVL 85

    Accepted Solution

    by:
    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
     

    Author Comment

    by:joely2k
    Thanks Idle Mind for your help.....
    Appreciated..
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Product Review - Android Remix

    Come along for the ride with our Senior Product Manager, Brian Matis, as he reviews the Android Remix.

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video discusses moving either the default database or any database to a new volume.

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now