Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 107,698 VB Programmers for FREE! Ask your question and get quick answers from experts. There are 1,056 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Event not fired when inside of a dll

 
Reply to this topicStart new topic

Event not fired when inside of a dll

floydus
post 30 Jun, 2008 - 12:44 PM
Post #1


New D.I.C Head

*
Joined: 30 Jun, 2008
Posts: 1

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

wub.gif
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.

User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/30/08 01:31AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month