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. Visual Basic
  4. How do i code an animated (gif) button in vb.NET?

How do i code an animated (gif) button in vb.NET?

Scheduled Pinned Locked Moved Visual Basic
questioncsharp
2 Posts 2 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.
  • Q Offline
    Q Offline
    qsdnj
    wrote on last edited by
    #1

    i have 2 images and when mouse goes over 1 the other shows. how do i code it? i started out putting picture box. am i on the right way? im a rookie so plz be specific. thank you.

    R 1 Reply Last reply
    0
    • Q qsdnj

      i have 2 images and when mouse goes over 1 the other shows. how do i code it? i started out putting picture box. am i on the right way? im a rookie so plz be specific. thank you.

      R Offline
      R Offline
      RZLR
      wrote on last edited by
      #2

      First you should reference "System.Drawing" by right clicking on references or add "Imports System.Drawing" to the top of your project. In the class name dropdown (above your code) choose the command button and next to that in the method name dropdown choose MouseHover/MouseLeave. Enter code similar to the following: Private Sub Button1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseHover Button1.Image = Image.FromFile("D:\Source\App.ico") End Sub Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave Button1.Image = Image.FromFile("D:\Source\Add.ico") End Sub :)

      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