Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Display image on Hover on a button in a winform

Display image on Hover on a button in a winform

Scheduled Pinned Locked Moved C#
questionlearning
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    edlanka
    wrote on last edited by
    #1

    I have a image button in a winform. On mouse hover i would like to change the image of the button. When the focus is lost i would like to show the original image . I am handling the mouse_hover and mouse_leave events and changing the value of image property to the image i need. My images are stored in the resource file. Is this the right way to do it? Please let me know..

    C 1 Reply Last reply
    0
    • E edlanka

      I have a image button in a winform. On mouse hover i would like to change the image of the button. When the focus is lost i would like to show the original image . I am handling the mouse_hover and mouse_leave events and changing the value of image property to the image i need. My images are stored in the resource file. Is this the right way to do it? Please let me know..

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Yeah, that seems the best way to me.

      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

      M 1 Reply Last reply
      0
      • C Christian Graus

        Yeah, that seems the best way to me.

        Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

        M Offline
        M Offline
        mohmeh83
        wrote on last edited by
        #3

        you can use a imageList and insert your images into it and on mouse events change button imageIndexes for example: mybutton.ImageIndex = 0;

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups