Quick Info

A feature in Visual Studio's IntelliSense that is not available in VBA is Quick Info. When you hold the mouse cursor over an identifier, Visual Studio displays a Quick Info tip, which shows the declaration of the identifier. Each time the cursor is moved to a new section of the code, the tool tip displays updated Quick Info about the target identifier. Notice in Figure 2.24 that the tool tip is updated when the cursor position is moved in the code from ActionsPane to Add to DateTimePicker.

Me.ActionsPane.Controls.Add(New DateTiroeP icker) ¬°Friend Pirn WithEvents ActionsPane As Microsoft.OFFice.Tools, ActionsPane |

He. ActionsPane. ControIs. ijdd (New DateTiroeP icker) ¬°Public Overridable Sub Add(value As System,windows.Form?,Control)|

He. ActionsPane.Controls . Add(Nesr DateTimeJ icker)

Figure 2.24. Quick Info displayed when a control is added to the actions pane Complete Word

If you're not a very fast typist or you are not sure of the exact member name, then you will probably enjoy the Complete Word feature in Visual Studio. This feature is not available in VBA. When you start typing a word in the Visual Studio Code Editor, you can press ALT+right arrow or CTRL+spacebar, and Visual Studio will automatically complete the word (provided you have typed enough characters that it can be recognized). If several choices are associated with the characters you have typed, Visual Studio provides a drop-down list from which you can choose the correct word. Visual Studio also supports auto-completion of various keywords, such as Option (to turn on Option Strict or Option Explicit) and auto-completion of enumerations.

Many of these IntelliSense options are on by default, but you can modify the settings. For example, in the Options dialog box, shown in

Figure 2.25, you can set statement completion options such as Auto List Members and Parameter Information. To display the Options dialog box, click the Tools menu and then click Options. Expand the Text Editor node, and then select the General tab under the All Languages node. Next, clear the Auto List Members check box or the Parameter Information check box to disable these features. If you want to apply these changes only for Visual Basic, you can optionally change these settings in the General tab under the Basic node.

Figure 2.25. Statement completion options for Text Editor
0 0

Post a comment