Results 1 to 6 of 6

Thread: OnMouseOver

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2000
    Posts
    40

    Angry

    Hey, Well I got a problem with OnMouseOver..
    Using a Timer Control to see if the current mouse position is on the control takes alot of resources during the application lifetime and using SetCapture and ReleaseCapture works great but when I used it on a control with a ToolTipText, the ToolTipText doesn't appear.

    So, What's the problem? Any solutions?

    Anyone got a alternative OnMouseOver code?
    Using Visual Studio 6 Enterprise
    ---------------------------------
    Everyone needs help at some point..
    This time or another.

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Maybe you need to put Doevents in.
    Code:
    DoEvents
    And most controls in vb have a MouseMove event.
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2000
    Posts
    40

    Angry

    OK, you see. I never posted any messages in a forum before..Never ever.

    Because I always wanna mess around with codes until I
    finally gets it or got tired and give up which I never did,
    only this time.

    Ok! Great! MouseMove works but for those of you who used MouseMove and Form_MouseMove to track MouseOver..telling you it's doesn't work that way. It works but if you move the mouse
    really quick across the control..hmmm guess what? The Event
    doesn't occur.

    Like I was asking..Please, Please, Please
    Anybody who knows how PLEASE post it..

    [Edited by syn_bOy on 11-24-2000 at 01:45 AM]
    Using Visual Studio 6 Enterprise
    ---------------------------------
    Everyone needs help at some point..
    This time or another.

  4. #4
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Maybe you need to put DoEvents in the timer event of the timer control.
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    You know why it doesn't occur? because the mouse never moves, it jumps over it, it's that simple. Theres no way catching such events unless you calculate the line between two mouse jumps and see if it crosses any border of the button. I don't think any control does that, and you really don't need it either. At least not if the purpose is to make a coolbutton. mousemove event is fairly better than using a timer, since the timer won't fire more frequent than each 53'th millisecond.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  6. #6

    Thread Starter
    Member
    Join Date
    Nov 2000
    Posts
    40

    Talking

    OK, thanks for all your replies. Even though I don't get
    many, I still appreciate it. After hours of posting on this
    forum and the first message I've ever posted. I found the solution.

    :: Using Timers takes alot of CPU resources during the
    application lifetime.

    :: Using Control_MouseMove and Form_MouseMove doesn't work
    properly especially when the End-User has set the mouse
    speed to fast.

    :: Using SetCapture and ReleaseCapture doesn't work with
    and cannot support ToolTipText.

    >> Now, after messing around with my codes..
    I found my own solution to my own problem..That's Funny!

    I think I'll make it an OCX Control and make public release
    for anyone who wants to add features such as OnMouseOver to
    their application.

    Well, wish you guys luck with VB.
    Using Visual Studio 6 Enterprise
    ---------------------------------
    Everyone needs help at some point..
    This time or another.

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