Strange error after call to AfterShowModalForm()

Support forum for ARG-Software Design Lab. Command Bars Library []
Post Reply
Posts: 2
Joined: Fri Jan 20, 2012 4:27 am

Strange error after call to AfterShowModalForm()

Post by 4Technology »

Hi Alex,

Attached is an error that I've encountered today in my app, hopefully you'll know the fix for it...

#5, #6 and #7 show the call stack in the commandbarsmanager object, which leads to the "Variable ' 11' is not found" error. Sometimes the error is "Variable ' 10' is not found" instead.

In the Unload event of my form baseclass I call _screen.CBM.AfterShowModalForm() if the form was shown modally; BeforeShowModalForm() is called in the form's Activate event.

This works fine for 99% of my app, except for one particular situation where the error above always occurs.
Whenever one particular form is open (which is modeless) and I open and then close a modal form then the error occurs, as a result of calling AfterShowModalForm() from the modal form's Unload evvent.
Even more strangely : if only that particular form is open and then I open and close a modal form then the error occurs, but if I open another modeless form in addition to the first one and then open and close a modal form then no error occurs!
The only thing different about this particular form is that it has an ActiveX control on it.

The ribbon still becomes enabled again as it should, even with the error.

For the moment I've wrapped the call to AfterShowModalForm() in a try..catch..endtry, to suppress the error.

Any ideas on why the error might be happening?

screenshot of error
screenshot of error
untitled.PNG (14.32 KiB) Viewed 2459 times
Post Reply