Results 1 to 4 of 4

Thread: Mouse Events for Systray Component

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    6

    Post

    I made a Component which is able to add/delete/manipulate etc. an icon in the systray. It works fine.
    By programming the events, i am able to use Mouseup, down and DoubleClick for Left, Middle and Right Button.
    To raise the event of a simple MouseClick I have to decide whether to use the UP or DOWN procedure.
    But the UP and Down Procedure is also an element of the DoubleClick !! So every time i click twice I also get the reaction of Mouseup and down.
    The difficulty is, that a fast click can also mean a double click is following. When i click slowly i can proof this by watching the doubleclicktime.

    Perhaps anyone has got a simple idea of simulating a ClickEvent that comes only by clicking once?

    Thanks for each idea...even if won't work!

    Torsten

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I've done some tests on the form, click events seems to activate on the first click, but the doubleclick will activate on the second. Same is for catching the events on the trayicon:
    WM_MBUTTONDBLCLK
    WM_RBUTTONDBLCLK
    WM_LBUTTONDOWN
    Use these to activate the doubleclick, and if you don't get a doubleclick message then it's a single click.
    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    6
    Thanks for your answer !

    When I start to press a mouse button (for example the left one), I get the MouseDOWN event. OK.
    After leaving the Mouse Button the Up event follows. When both events are very fast, I don't know if this will be a single click or a double click. In my opinion I have to wait for the next events and look when they come. This means i have to store the values and when nothing follows, the single click will be delayed.

    Do you know, if the doubleclick creates an Event of:
    a) first DBLClick then UP
    or b) first UP then Double

    Torsten

  4. #4

    Angry Can I drag n drop files to the Systray icon???

    I can't figure this out. Please help.
    Fernando T. Cabredo

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