Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Gordon King
  Where is Gordon King?
 London
 United Kingdom
 Gordon King
 To: Frank Cazabon
  Where is Frank Cazabon?
 
 Trinidad And Tobago
 Frank Cazabon
 Tags
Subject: RE: Trapping error when instantiating
Thread ID: 331427 Message ID: 331432 # Views: 46 # Ratings: 0
Version: Visual FoxPro 9 Category: Active X Controls & OLE Automation
Date: Thursday, December 29, 2011 8:39:06 PM         
   


> >
> >
> > Hi Frank,
> >
> > Wouldn't a combination of both work best?, say by creating a wrapper that does the CreateObject/Try/Catch attempt right before running that form or an alternate one, or maybe do the try/catch only once when the application starts and store the result somewhere in a goApp.desiredActivexAvailable property?
> >
>
> Hi Stefan,
>
> I guess that would work, but then I need to have two separate forms, which isn't hard, it just doesn't feel "clean" to me, so I'm hoping there's a way to either trap the error, or add code to the events when I use Createobject()
>
> Frank.
>
> Frank Cazabon
> Samaan Systems Ltd.
> www.SamaanSystems.com

Hi Frank,

Are you thinking that the object just wouldn't exist on the form if Activex isn't installed? Couldn't you create a container class (visual) containing the Activex object with the additional code you want to add, then instantiate the container in code on the form with TRY...CATCH...?

Gordon

ENTIRE THREAD

Trapping error when instantiating Posted by Frank Cazabon @ 12/29/2011 7:50:06 PM
RE: Trapping error when instantiating Posted by Stefan Wuebbe @ 12/29/2011 8:25:47 PM
RE: Trapping error when instantiating Posted by Frank Cazabon @ 12/29/2011 8:31:38 PM
RE: Trapping error when instantiating Posted by Gordon King @ 12/29/2011 8:39:06 PM
RE: Trapping error when instantiating Posted by Frank Cazabon @ 12/29/2011 8:45:13 PM
RE: Trapping error when instantiating Posted by Gordon King @ 12/29/2011 8:49:45 PM
RE: Trapping error when instantiating Posted by Frank Cazabon @ 12/29/2011 8:52:49 PM
RE: Trapping error when instantiating Posted by Gordon King @ 12/29/2011 8:58:27 PM
RE: Trapping error when instantiating Posted by Frank Cazabon @ 12/29/2011 9:07:16 PM
RE: Trapping error when instantiating Posted by Vincent Byrne @ 1/4/2012 10:05:26 PM
RE: Trapping error when instantiating Posted by Frank Cazabon @ 1/6/2012 1:51:57 PM
RE: Trapping error when instantiating Posted by Jun Tangunan @ 1/5/2012 3:23:50 AM
RE: Trapping error when instantiating Posted by Frank Cazabon @ 1/6/2012 1:52:34 PM
RE: Trapping error when instantiating Posted by Ilya Rabyy @ 1/6/2012 4:08:11 PM
RE: Trapping error when instantiating Posted by Frank Cazabon @ 1/6/2012 11:19:52 PM