mousemove/mouseenter/etc problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tim Mulholland

    #1

    mousemove/mouseenter/etc problems

    i posted this a while ago and never got a response, but i'm still having
    problems, so i thought i'd see if anyone had any sudden realizations this
    time
    Thanks in advance!

    Tim


    I have written some code that causes mouseover effects on a picture box.
    The code works fine most of the time and creates some really nice effects.

    HOWEVER,
    If i try, i can get the effects to not disappear (as if the MouseLeave event
    isn't firing) or i can get the effects to not appear in the first place (as
    if the MouseEnter/MouseMove events aren't firing).
    More or less i can do this by just moving the mouse slowly into the
    picturebox and slowly out of the picturebox.
    I'm just handling this events and, in two or three lines of code, setting
    properties of the picturebox.
    Is there something else i need to be doing?

    Thanks,
    Tim

    P.S. I've written code to handle the MouseMove event for the form the
    picturebox is contained in, and this seems to mostly fix the problem of the
    MouseLeave event not firing, but thats kinda a hack, not a true fix. And it
    doesn't fix the other problem either.


  • Val Savvateev

    #2
    Re: mousemove/mouseenter/etc problems

    If that's just two or three lines of code why don't you post it here. Doing
    so may help....

    "Tim Mulholland" <tim@eyerespons e.com> wrote in message
    news:ujixqYUVDH A.2248@TK2MSFTN GP10.phx.gbl...[color=blue]
    > i posted this a while ago and never got a response, but i'm still having
    > problems, so i thought i'd see if anyone had any sudden realizations this
    > time
    > Thanks in advance!
    >
    > Tim
    >
    >
    > I have written some code that causes mouseover effects on a picture box.
    > The code works fine most of the time and creates some really nice effects.
    >
    > HOWEVER,
    > If i try, i can get the effects to not disappear (as if the MouseLeave[/color]
    event[color=blue]
    > isn't firing) or i can get the effects to not appear in the first place[/color]
    (as[color=blue]
    > if the MouseEnter/MouseMove events aren't firing).
    > More or less i can do this by just moving the mouse slowly into the
    > picturebox and slowly out of the picturebox.
    > I'm just handling this events and, in two or three lines of code, setting
    > properties of the picturebox.
    > Is there something else i need to be doing?
    >
    > Thanks,
    > Tim
    >
    > P.S. I've written code to handle the MouseMove event for the form the
    > picturebox is contained in, and this seems to mostly fix the problem of[/color]
    the[color=blue]
    > MouseLeave event not firing, but thats kinda a hack, not a true fix. And[/color]
    it[color=blue]
    > doesn't fix the other problem either.
    >
    >[/color]


    Comment

    • Stephan Kabisius

      #3
      Re: mousemove/mouseenter/etc problems

      Tim,

      Maybe forcing a refresh/redraw of the pictureBox via Update() will do the
      trick. If you are not sure if your event is fired, try setting a breakpoint
      in the event handler (or add a Message.Show("I nside MouseLeave") to your
      handler code).

      Good Luck,
      Stephan

      "Tim Mulholland" <tim@eyerespons e.com> wrote in message
      news:ujixqYUVDH A.2248@TK2MSFTN GP10.phx.gbl...[color=blue]
      > i posted this a while ago and never got a response, but i'm still having
      > problems, so i thought i'd see if anyone had any sudden realizations this
      > time
      > Thanks in advance!
      >
      > Tim
      >
      >
      > I have written some code that causes mouseover effects on a picture box.
      > The code works fine most of the time and creates some really nice effects.
      >
      > HOWEVER,
      > If i try, i can get the effects to not disappear (as if the MouseLeave[/color]
      event[color=blue]
      > isn't firing) or i can get the effects to not appear in the first place[/color]
      (as[color=blue]
      > if the MouseEnter/MouseMove events aren't firing).
      > More or less i can do this by just moving the mouse slowly into the
      > picturebox and slowly out of the picturebox.
      > I'm just handling this events and, in two or three lines of code, setting
      > properties of the picturebox.
      > Is there something else i need to be doing?
      >
      > Thanks,
      > Tim
      >
      > P.S. I've written code to handle the MouseMove event for the form the
      > picturebox is contained in, and this seems to mostly fix the problem of[/color]
      the[color=blue]
      > MouseLeave event not firing, but thats kinda a hack, not a true fix. And[/color]
      it[color=blue]
      > doesn't fix the other problem either.
      >
      >[/color]


      Comment

      • Tim Mulholland

        #4
        Re: mousemove/mouseenter/etc problems

        I'm positive that the events are NOT firing if i try to "trick" it.
        If i just move the mouse slowly off the object (or sometimes if i do it
        quickly), the MouseLeave event is never fired.
        So i'm having to catch the MouseEnter/MouseMove events of the objects
        surrounding my pictureboxes and forcing a clear of the picture box.
        It just seems like i should have to do that.
        Unless someone comes up with something by the morning, i'll post some code
        so yall can test what i'm talking about.
        Thanks for your help so far people, i appreciate it.

        Tim

        "Stephan Kabisius" <kabisius@yahoo .com> wrote in message
        news:ua664vUVDH A.3220@tk2msftn gp13.phx.gbl...[color=blue]
        > Sorry, that was supposed to be 'MessageBox.Sho w("Inside MouseLeave")'.
        >
        > Stephan
        >
        > "Stephan Kabisius" <kabisius@yahoo .com> wrote in message
        > news:%23h8%23Ht UVDHA.392@TK2MS FTNGP11.phx.gbl ...[color=green]
        > > Tim,
        > >
        > > Maybe forcing a refresh/redraw of the pictureBox via Update() will do[/color][/color]
        the[color=blue][color=green]
        > > trick. If you are not sure if your event is fired, try setting a[/color]
        > breakpoint[color=green]
        > > in the event handler (or add a Message.Show("I nside MouseLeave") to your
        > > handler code).
        > >
        > > Good Luck,
        > > Stephan
        > >
        > > "Tim Mulholland" <tim@eyerespons e.com> wrote in message
        > > news:ujixqYUVDH A.2248@TK2MSFTN GP10.phx.gbl...[color=darkred]
        > > > i posted this a while ago and never got a response, but i'm still[/color][/color][/color]
        having[color=blue][color=green][color=darkred]
        > > > problems, so i thought i'd see if anyone had any sudden realizations[/color][/color]
        > this[color=green][color=darkred]
        > > > time
        > > > Thanks in advance!
        > > >
        > > > Tim
        > > >
        > > >
        > > > I have written some code that causes mouseover effects on a picture[/color][/color][/color]
        box.[color=blue][color=green][color=darkred]
        > > > The code works fine most of the time and creates some really nice[/color][/color]
        > effects.[color=green][color=darkred]
        > > >
        > > > HOWEVER,
        > > > If i try, i can get the effects to not disappear (as if the MouseLeave[/color]
        > > event[color=darkred]
        > > > isn't firing) or i can get the effects to not appear in the first[/color][/color][/color]
        place[color=blue][color=green]
        > > (as[color=darkred]
        > > > if the MouseEnter/MouseMove events aren't firing).
        > > > More or less i can do this by just moving the mouse slowly into the
        > > > picturebox and slowly out of the picturebox.
        > > > I'm just handling this events and, in two or three lines of code,[/color][/color]
        > setting[color=green][color=darkred]
        > > > properties of the picturebox.
        > > > Is there something else i need to be doing?
        > > >
        > > > Thanks,
        > > > Tim
        > > >
        > > > P.S. I've written code to handle the MouseMove event for the form the
        > > > picturebox is contained in, and this seems to mostly fix the problem[/color][/color][/color]
        of[color=blue][color=green]
        > > the[color=darkred]
        > > > MouseLeave event not firing, but thats kinda a hack, not a true fix.[/color][/color][/color]
        And[color=blue][color=green]
        > > it[color=darkred]
        > > > doesn't fix the other problem either.
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...