Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stuart Rosen
  Where is Stuart Rosen?
 Melbourne
 Australia
 Stuart Rosen
 To: Jamie Osborn
  Where is Jamie Osborn?
 Melbourne
 Australia
 Jamie Osborn
 Tags
Subject: RE: Events not Firing
Thread ID: 33541 Message ID: 33623 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Active X Controls & OLE Automation
Date: Sunday, November 30, 2003 11:15:52 PM         
   


> > I have a form that has an .OCX control on it. The OCX control has an event called 'incomingcall'.
> >
> > This event is fired in 2 ways.
> >
> > 1. from a button on the form
> >
> > 2. called from another program
> >
> > When the event is fired from the button on the form, the event always fires. However, when called from the other program, there are some instances where the event does not fire immediately - this is pretty inconsistent. Once the other program has tried to fire the event, if I maximise the VFP window, then minimise it and maybe click in some other controls, the event will eventually be fired. It almost seems like VFP has had a delay in calling the event.
> >
> > Any help would be GREATLY appreciated.
> >
> > STuart
> >
>
> How does the other program call the event ? Does it have a reference to the .ocx ?
>
> As a side note.... Why are you calling an event.. Events are supposed to be automatic responses to something eg. Button.Click() is a response to a button being clicked. It's usually bad form to call events - you should always be calling methods as should events. Putting business logic in events can lead to messy code.
>
> Cheers,
> Jamie
> jamie.osborn@foxite.com

The control on the form opens a TCP/IP connection to the server. When an incoming message arrives, it raises the event in the OCX control on the form.

The OCX is a link to a CTI server, so we use an event (incomingcall) to recognise the incoming call.

Thanks.

ENTIRE THREAD

Events not Firing Posted by Stuart Rosen @ 11/28/2003 6:16:44 AM
RE: Events not Firing Posted by Jamie Osborn @ 11/28/2003 9:09:51 PM
RE: Events not Firing Posted by Stuart Rosen @ 11/30/2003 11:15:52 PM