Results 1 to 9 of 9

Thread: Adding new events 2 a control!!! ASAP!!!!!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    70

    Exclamation

    How can I add an onclick event to a control that does not have it?
    Kiziltan Yuceil
    Freelance Web/VB/VBA Programmer
    "It's not what you know it's to whom you consult and with whom you collaborate"

  2. #2
    Lively Member
    Join Date
    Nov 1999
    Location
    Cincinnati, OH
    Posts
    66
    Use the mouse up event instead of ONClick

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    70

    It doesn't have any mouse events at all!

    Kiziltan Yuceil
    Freelance Web/VB/VBA Programmer
    "It's not what you know it's to whom you consult and with whom you collaborate"

  4. #4
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    What control are you using?? Does it have an hWnd property??
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    70
    gif89a is the control,
    available events are:

    DragDrop
    DragOver
    GotFocus
    LostFocus
    Validate

    Kiziltan Yuceil
    Freelance Web/VB/VBA Programmer
    "It's not what you know it's to whom you consult and with whom you collaborate"

  6. #6
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    Never used the control, check and see if it has a gif89a.hWnd property, if it does you can use the API to do this, let me know and I'll send some code.
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    70

    Thumbs down no handle...

    No hwnd property is available..
    Kiziltan Yuceil
    Freelance Web/VB/VBA Programmer
    "It's not what you know it's to whom you consult and with whom you collaborate"

  8. #8
    Hyperactive Member Wak's Avatar
    Join Date
    Nov 2000
    Location
    Brisbane, Queensland
    Posts
    298

    Active X Events

    What does the control do?

    If it is simple, why don't you try to make a new Active X control, or see if you can get the code for the existing one?

    This is what I normally do.
    Visual Basic 6.0 Enterprise
    Visual C++ 6.0 Professional

    Wak

  9. #9
    Hyperactive Member Wak's Avatar
    Join Date
    Nov 2000
    Location
    Brisbane, Queensland
    Posts
    298

    Possible Answer


    Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

    If (x > gif98a.left) and (x < gif98a.left + gif89a.width) and (y > gif98a.top) and (y < gif98a.top + gif98a.height) then msgbox "gif98a has been clicked"

    End Sub

    This may work.

    If it does, ignore my last message.
    Visual Basic 6.0 Enterprise
    Visual C++ 6.0 Professional

    Wak

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