Results 1 to 3 of 3

Thread: Change an image

  1. #1
    Guest
    I have an image that says exit, what I want is the image to change to a different image when the mouse is over it and again when it is pressed. Is there anyway to do this.

  2. #2
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    Glasgow,Scotland
    Posts
    281

    Something to do with mouse over, roll over or something like that.

    It must be in VB help or something, like

    Image1_mouseover

    'change image here

    end sub

    image1_mouseoff

    'go back to the other image

    End sub


  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Code:
    'when it is clicked
    Private Sub Image1_Click()
    image1.picture = loadpicture(path)
    End Sub
    
    'when the mouse moves over the image
    Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    image1.picture = loadpicture(path)
    End Sub
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width