Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, Can somebody tell me how can

Status
Not open for further replies.

krshaikh

Programmer
Nov 18, 2001
45
US
Hi,

Can somebody tell me how can I call a method via Event asynchronously.

I am trying to create an ActveX exe. The purpose of that ActiveX server will be to print a crystal report asynchronously freeing my Vb application from hangups and delays. The crystal report control is residing on a form within the ActiveX Server. I have created an event and raised that event via my VB application. However its useless because I dont know how to invoke that specific method via Raise Event that is suppose to print the report.

Please see if anybody can help.

Regards,

- krshaikh -



 
Just raising the event is not sufficient.
The active exe does not exist until you create it.
See it like a class in a different process.

try this
1: on your event (say print) instantiate your form class in the active exe
2: run the print routine residing in this form
3: let this public class fire events that are received by your hosting class (fi when printing is finished or form is closed or something)
4: on receiving that event, destroy the instantiated active exe form object

The gap between theory and practice is not as wide in theory as it is in practice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top