I think the best way is to include a form in you're project, set this as the startup object of your activeX control project and have it of no size (height = 0 , width = 0) in this form, add some event's exactly the same as the VB mouse events and raise these event's in the event handlers
egin your control declare a variable like soCode:Event Click() Private Sub Form1_Click() RaiseEvent Click End Sub
whenever you need to set the capture, set it to the form and in the control you want to handle the events inCode:Dim WithEvents frmCaptureTarget As Form1this will start your form variable raising events like te form would. when you've finished with the captureCode:Set frmCaptureTarget = Form1you might want to move the form to the top left of your capturing control as well to save you converting tha mouse coords, although you should really do the conversion yourself.Code:set frmCaptureTarget = Nothing
hope this helps.


Reply With Quote