Results 1 to 7 of 7

Thread: Invoking multiple Event handlers and events!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2003
    Posts
    28

    Invoking multiple Event handlers and events!

    Is there a way to synchronize two handlers for a single event ?
    Also, is there a way to combine two different events that have the same handle ? Thanks
    Regards --
    Vujjeni

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Is there a way to synchronize two handlers for a single event ?
    What do you mean?

    Also, is there a way to combine two different events that have the same handle ?
    You can add items to handles statement at the end of the method that handles the event, if set at designtime. Or at runtime you can use AddHandler to specify which method handles an event.
    VB Code:
    1. Public Sub ClickHandler(sender as object, e as eventargs)  Handles btnOk.Click, btnApply.Click
    2.  
    3. AddHandler btnApply.Click,AddressOf ClickHandler

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2003
    Posts
    28
    Can you tell me which events do i use to accomplish this :
    The user clicks on a circle and drags it so that the circle becomes bigger. Now, I want to display the circle as it grows while the user drags it. Thanks for your time.
    Regards --
    Vujjeni

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You are talking about a circle drawn through GDI, right? Then I don't believe it has events, or if it does I don't which ones, sorry.

  5. #5
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    May I suggest Control.MouseMove with a check to see if the button is depressed?

  6. #6

    Thread Starter
    Junior Member
    Join Date
    May 2003
    Posts
    28
    See there is no control associated with this. I draw a circle using createGraphics method. Thats why this is stumping me. I could have used the drag and drop if it were a control. I can use mousedown to get the coordinates when the user starts dragging and mouse up coords to find the distance dragged and then expand the circle. But I want the circle growing as the dragging is happening, the drag should be visible.
    Regards --
    Vujjeni

  7. #7
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    Would Form.MouseMove not work?

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