Results 1 to 6 of 6

Thread: Image swapping

  1. #1

    Thread Starter
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    I've got an image that changes when you move the mouse over the top of it. I've got it to work so that when you move the mouse over it, it changes pictures (I used Image1.MouseMove event) but I can't get it to change back. I can't figure out what event I need. Please help.

    ------------------
    Thanks,
    Ryan
    corneslen@hotmail.com
    ICQ# 47799046

  2. #2
    Lively Member
    Join Date
    Jun 1999
    Location
    Ireland
    Posts
    96

    Post

    I'm assuming that you want the original picture to change back, when the mouse moves off of the image control.

    1 way is to use the mouse move of a surrounding object, ie place a label under the image control and make it bigger than the image control.

    Hope this helps,

    Steve.

  3. #3
    Hyperactive Member Juan Carlos Rey's Avatar
    Join Date
    Aug 1999
    Location
    Mendoza, Argentina
    Posts
    301

    Post

    Put a frame or a label. Or simply code in the mouse move event of the form itself.

    On the original picture:
    Image2.Visible = True
    to visualize the second image. And on the frame, label, or even another picture:
    Image2.Visible = False
    to restore Image1

  4. #4

    Thread Starter
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    Thank you so much, it works perfectly now!

    ------------------
    Thanks,
    Ryan
    corneslen@hotmail.com
    ICQ# 47799046

  5. #5
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,175

    Post

    It may not matter to you, and not that I can suggest a better way, but the object within an object approach will probably not work if you move the mouse very quickly off the image to an area outside of the container object.

    ------------------
    Marty

  6. #6

    Thread Starter
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    That's true, it does not register the movement of the mouse very quickly, so if you move the mouse off of the picture very fast, then it still has the same picture as it did before. You are absolutely correct on that one Marty. So does anyone have a better suggestion? One that doesn't have any glitches like this, or at least where the glitches are very difficult to encounter (meaning, the odds of the glitch occuring are very small).

    ------------------
    Thanks,
    Ryan
    corneslen@hotmail.com
    ICQ# 47799046

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