views:

350

answers:

2

Is there a way to change the context sensitive help in Visual Studio so that it will only search against the text under the caret instead of a complilation error in your code?

More info: After you compile and receive a compilation error(underlined), placing the caret within the underlined text and pressing F1 will take you to the Compliation error page instead of the help for the function under the caret. Can this behavior be changed to always go to the method/keyword help?

Language: C#

A: 

If I remember, after you compile, the default selected window is the message (error list) one. If you hit F1 at this point, you will get help on the error message. But if you select the code window, you will get the help on the selected text.

Is this the behavior your are experiencing???

Hapkido
I think this applies even before compilation
RobS
+2  A: 

The only solution I've found is to fix the compile error ;-)

A workaround is to use the 'Dynamic Help' window (from the help menu, or CTRL-F1, D), the compile error is top of the list but the usual item will be listed next.

For those that don't understand the question, here's a trivial, unrealistic example:

int myInt = new int(3);

As soon as you move off the line, the 'new int(3);' bit is underlined in red, but if you select the second 'int' and press F1, you get help on declaring integers.

However if you compile it, the offending section is underlined with a wiggly blue line and selecting 'int' and pressing F1 takes you to help on the compile error. It's not just a case of the focus moving to the Error List window.

Robin Bennett