dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 8, 1997

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Writing Add-ins Can Be Tricky

Writing add-ins for Visual Basic 4.0 can be challenging, rewarding, and tricky. If you are not careful writing add-ins, you can cause VB to do strange things and even abort. Although I'm sure that other diagnostics can occur, this error has appeared more than once for me while I was debugging add-ins. The messages may vary, depending on the operating system, but the result is the same.

For example, under Windows 95, you might see "This program has caused an error and will be terminated…" or "If the problem persists, contact the vendor.…" Under Windows 3.1, it may result in a GPF.

These occur when the IDE is being unloaded and will be followed on a subsequent reload of VB with this: "xxxxxx add-in could not be loaded, do you want to remove it from the list of Add-ins?"

After this, you will have to re-execute the add-in to reregister it for attachment to VB. I have found two causes for these errors:

1. Referencing a property of the VBIDE Instance Object, such as ActiveProject.Filename in the ConnectAddin Event of the Connector Class.

2. Connecting more menu or sub-menu items than you disconnect.

Most programming is an exact science, and strict adherence to "mostly undocumented" rules is an absolute necessity when writing add-ins for VB4.

Les Smith
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date