Results 1 to 6 of 6

Thread: simple question plz help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    East Ballina,NSW,Australia
    Posts
    121

    Cool simple question plz help

    Hi There,

    I'm creating an active X ocx at the moment for my other VB app.

    what i need to do is create an DblClick event for when the user double-clicks on my active X control, how do i do this?

    Thanks.

    Smithy.

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    VB Code:
    1. Option Explicit
    2. Public Event OCXDoubleClick()
    3.  
    4. Private Sub UserControl_DblClick()
    5.     RaiseEvent OCXDoubleClick
    6. End Sub
    -= a peet post =-

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    East Ballina,NSW,Australia
    Posts
    121

    thanks, it worked but...

    Thanks peet.

    I only got one small problem though, my usercontrol has an additional control attached to it and this particular control doesn't have a double-click event. The problem is that this control covers most of the usercontrol so it makes it extremely hard for the double-click even to work.

    Is there an additional way to get it the double-click to work no matter if they click on the user control or the other control on the user control?

    Thanks

    Smithy.

  4. #4
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    hmm.. if the control on the usercontrol is not u'r own, and does not have a double click event, u have a problem.

    does it have other events like mouseup or mousedown events?
    -= a peet post =-

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    East Ballina,NSW,Australia
    Posts
    121

    nope

    The closest thing it has is gotfocus and lostfocus. It also has drapdrop and dragover

    Thanks

  6. #6
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    hmm then I don't see how u can catch the doubleclick event... sorry

    try posting a new thread in the API, ask if anyone now how to detect doubleclick event on an OCX with no doubleclick event.. they might know.
    -= a peet post =-

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