com >> Missing OCX event in DLL

by hakan_cn » Wed, 15 Feb 2006 21:39:40 GMT

Hi All!

I'm using events from a OCX component that is connected to the stock
market.
It's quite simple, the OCX component is put in a Form, the
subscription of a instrument is done during form_load and the events
are coming in and are sent to an Label on the form. Everything works
great. The events are just coming in...

Until I convert the application to a DLL and plug it in to my charting
package. I still have my Form, but also another class that has a number
of public functions that the charting package uses. This class create
an instance of the Form and feeds it with information about what
instrument to subscribe to and some objects to use for updating the
charting package.
Easy... Everything works OK in the charting package for three to four
minutes. Then suddenly; no more events are coming thru from the OCX.
They just stop and I don't get any error messages what so ever.

How come that the events just stops when I use a DLL?

Thoughs... Anyone?



com >> Missing OCX event in DLL

by Ken Halter » Thu, 16 Feb 2006 00:01:26 GMT






Does this happen only in the IDE? or does it effect the finished/compiled
app too? Is there a modal form involved?

BUG: Event Does Not Fire in the IDE When Raised from Inside a Compiled Modal
Form
http://support.microsoft.com/kb/237286/en-us

BUG: UserControl Event Is Not Raised from a Modal Form
http://support.microsoft.com/kb/177996/en-us

Other than the above, the only thing I can think of is that somehow, the
object variable you're using to trap the events is getting set to Nothing or
another instance of the DLL or ??... or, possibly, the OS is working too
hard to allow the events to be processed... if that's the case, a DoEvents
somewhere may fix the problem.


--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Freeware 4 color Gradient Frame? http://www.vbsight.com/GradFrameCTL.htm





Similar Threads

1. Missing OCX event in DLL

Hi All!

I'm using events from a OCX component that is connected to the stock
market.
It's quite simple, the OCX component is put in a Form, the
subscription of a instrument is done during form_load and the events
are coming in and are sent to an Label on the form. Everything works
great. The events are just coming in...

Until I convert the application to a DLL and plug it in to my charting
package. I still have my Form, but also another class that has a number
of public functions that the charting package uses. This class create
an instance of the Form and feeds it with information about what
instrument to subscribe to and some objects to use for updating the
charting package.
Easy... Everything works OK in the charting package for three to four
minutes. Then suddenly; no more events are coming thru from the OCX.
They just stop and I don't get any error messages what so ever.

How come that the events just stops when I use a DLL?

Thoughs... Anyone?

2. Registering OCX on Win2000 - SGrid 2.0 from vbAccelerator - events missing - Visual Basic

3. Crystal Reports - Visual Basic UFL that implements this function is missing (or U2lcom.dll is missing)

4. UFL that implements the function is missing (or U2lcom.dll is missing) - VB Crystal Report