Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Event for code module

4 views
Skip to first unread message

pink-coder

unread,
Jan 16, 2009, 7:03:53 AM1/16/09
to
I have to write an add-in that displays a message box whenever the user
clicks somewhere on the code and tells the line # e.g "This is line # 232"

I dont know what event needs to be captured and of what object. The
CodeModule object doesn't seem to have any events.

Any help ?


expvb

unread,
Jan 16, 2009, 12:17:02 PM1/16/09
to
"pink-coder" <pink-...@yahoo.com> wrote in message
news:gkpt3e$3os$1...@news.motzarella.org...

There are no events like this. You could use a Timer and check for changes.
If you want to do something more complicated, you have to install a hook
into the IDE. The following Addin sample does this:

Multi Tab Addin for VB6 IDE Code Editing
http://groups.google.com/group/microsoft.public.vb.addins/browse_thread/thread/699cf05630a2813e

Phill W.

unread,
Jan 19, 2009, 8:26:02 AM1/19/09
to
pink-coder wrote:

> I have to write an add-in that displays a message box whenever the user
> clicks somewhere on the code and tells the line # e.g "This is line # 232"

I'm always slightly worried when a post begins "I have to ..." or "I
need to ...". All too often, it's followed by something an "unusual"
that is either very difficult to do in VB or, in some cases, simply
shouldn't be done at all.

If we're talking about the VB6 IDE here, you already get the line (and
column) number; they're in a block at the end of the "Standard" toolbar
(reading "Ln 1, Col 1" ).

HTH,
Phill W.

0 new messages