I had a form without the class lib. Could I force open the form ignoring the class instantiation error?
Other than opening the form.scx, delete those references and pack it ... :)
You could also create a temporary classlib.
Tracy
On March 18, 2023 9:26:05 AM EDT, Man-wai Chang changmw@gmail.com wrote:
I had a form without the class lib. Could I force open the form ignoring the class instantiation error?
Other than opening the form.scx, delete those references and pack it ... :)
-- .~. Might, Courage, Vision. SINCERITY! / v \ https://github.com/changmw/changmw /( _ )\ http://sites.google.com/site/changmw ^ ^ May the Force and farces be with you!
[excessive quoting removed by server]
Timely question! I just had this happen to a client last Thursday. App has been working for years, but they called to say it suddenly doesn't work with a "Cannot load class" type of error.
After some troubleshooting we determined the issue was their MSP's security software determined that RichTxt32.ocx was malicious and blocked it. It would have been nice if the app could catch that particular error and load the form without those controls present rather that fail altogether. It may cause deleterious side effects though. I may give this some thought...
Eric
On Sat, Mar 18, 2023 at 8:26 AM Man-wai Chang changmw@gmail.com wrote:
I had a form without the class lib. Could I force open the form ignoring the class instantiation error?
Other than opening the form.scx, delete those references and pack it ... :)
-- .~. Might, Courage, Vision. SINCERITY! / v \ https://github.com/changmw/changmw /( _ )\ http://sites.google.com/site/changmw ^ ^ May the Force and farces be with you!
[excessive quoting removed by server]
I think I have done this at one time by: Place the ocx in a class of your own. Add the class during the Init wrapped in a Try/Catch.
It adds an extra level to the hierarchy.
HTH, Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Eric Selje Sent: Monday, March 20, 2023 10:30 AM To: profoxtech@leafe.com Subject: Re: Error instantiating class when opening a form
Timely question! I just had this happen to a client last Thursday. App has been working for years, but they called to say it suddenly doesn't work with a "Cannot load class" type of error.
After some troubleshooting we determined the issue was their MSP's security software determined that RichTxt32.ocx was malicious and blocked it. It would have been nice if the app could catch that particular error and load the form without those controls present rather that fail altogether. It may cause deleterious side effects though. I may give this some thought...
Eric
On Sat, Mar 18, 2023 at 8:26 AM Man-wai Chang changmw@gmail.com wrote:
I had a form without the class lib. Could I force open the form ignoring the class instantiation error?
Other than opening the form.scx, delete those references and pack it ... :)
-- .~. Might, Courage, Vision. SINCERITY! / v \ https://github.com/changmw/changmw /( _ )\ http://sites.google.com/site/changmw ^ ^ May the Force and farces be with you!
[excessive quoting removed by server]