Image of Navigational Panel mapped to Contents / Home / Search Programming VB 3.0 Add-Ins
Tech Support Question

Image of Line Break

Q. I have written a VB utility to insert some global error handling procedures into my VB code, however this utility is a standalone app which makes it very cumbersome to use in the VB development environment.

Other people at work would also like to use it but do not like having to edit the code in my app, save the changes, and then reload the saved modules/forms into VB.

How do I incorporate the code insertion functions into the VB IDE as an add-in? I believe I can do this by hooking into VB's menus with a subclassing VBX like msgblaster or msghook but I'm not completely sure how to do it. Also, how do I address the code editing window?

Any info you could provide would be greatly appreciated.

Thanks,
From: Joe Brinkman
Email: jmbrin@internext.com

P.S. My company has evaluated VB/Rig and VB-Safe and neither one was sufficient for our needs. We are also forced to remain in the VB 3.0 environment because of one of our major contracts.

A. Joe,

Hooking into the VB3 environment is a notoriously difficult and hairy exercise (I'm sure the developers of products like VBAssist would confirm that). The problem is that the environment was not built to be extensible and you therefore must jump through several hoops to get it even close to working. The concern is that you do not interfere with any other software that may be trying to interact with VB.

In essence, I would suggest that the easiest way for you to go would be to leave your application as a separate entity. You may want to consider interacting directly with a VB code window by sending keystrokes directly to the window. I would suggest that you get the hWnd of the window and then use the SendMessage API to send the keystrokes as WM_Char messages. This gives the most reliable method of ensuring which window is receiving the keystrokes.

I'm sorry I can't give a definitive answer as to how to do this best and easily, but I don't think that answer exists. Good luck with your efforts, however, and I hope you manage to get your app working something like the way you want it.


Image of Arrow to Previous Article Image of Arrow to Next Article

[TECH SUPPORT TOC]
Image of Line Break
[HOME] [TABLE OF CONTENTS] [SEARCH]