How can I add an onclick event to a control that does not have it?
Printable View
How can I add an onclick event to a control that does not have it?
Use the mouse up event instead of ONClick
:(
What control are you using?? Does it have an hWnd property??
gif89a is the control,
available events are:
DragDrop
DragOver
GotFocus
LostFocus
Validate
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.
No hwnd property is available..
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.
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.