Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Frank Cazabon
  Where is Frank Cazabon?
 
 Trinidad And Tobago
 Frank Cazabon
 Tags
Subject: RE: Trapping error when instantiating
Thread ID: 331427 Message ID: 331430 # Views: 57 # Ratings: 0
Version: Visual FoxPro 9 Category: Active X Controls & OLE Automation
Date: Thursday, December 29, 2011 8:25:47 PM         
   


> Hi,
>
> I have an ActiveX that I added to a form (visually). Certain PCs that the system gets installed on will not have this ActiveX available. Is there a way to trap this?
>
> I know I could use a CREATEOBJECT to instantiate the ActiveX and wrap that in a TRY... END rather than put it visually on the form, but I need to put it visually so that I can add some code to the ActiveX's Events.
>
> Frank.
>
> Frank Cazabon
> Samaan Systems Ltd.
> www.SamaanSystems.com


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?



Regards
-Stefan

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