I'm using an OCX control and the event is not fired when I am creating the object using Set as per this code.
CODE
Set myImage = New NtlxImage
The thing is, when I drag this control inside a form, it works just perfectly, the callback method is fired correctly. What I need is to use this same control (from OCX file) inside a dll. Here the code showing what i did.
CODE
Public WithEvents myImage As NtlxImage....
Set myImage = New NtlxImage
myImage.unit = "10.1.1.214"
myImage.auth = "\10.1.1.214\ADMIN\5555555"
myImage.Time = "live"
myImage.resolution = 2
myImage.Display
...
the following method should get fired by the Display method.
CODE
Private Sub myImage_ImageReceived(ByVal sUnit As String, ByVal nPort As Integer, ByVal nCamera As Integer, ByVal eResolution As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal sTime As String)
writelogging "Ok fired"
imageArrived = True
myImage.SaveImage ("c:\image.bmp")
End Sub
When inside a Dll the myImage_ImageReceived is not fired... but it is always working when inside a form using the same code.
Is there something I can do or it simply would never work inside this dll ?
thanks.