Charles Steyn wrote:
My first problem is what would happen if more than 1 instance of Visual
Studio is active. Is it possible to refer to a specific instance with
the GetObject function?

In theory, GetObject returns a main Application object, which you would then interrogate to find out what documents are open. Using GetObject on Word, for example, would give you a single Word.Application object, which would contain references to all of the open documents.

I say, "In theory," because I don't know how Studio's COM architecture works. If they did it correctly, it would function the same way: you would retrieve a main Application object, and then determine from it what projects are open.

This is my second question? How can I hook the F8 and Shift-F8
keys only when the editor gets focus?

You would need to hook OnChildFocus and OnChildBlur. When the editor window gets focus, register your hotkeys. When the editor window gets blurred, unregister your hotkeys.

Aaron

--
To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.

Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development

Reply via email to