INTELLISENSE

If you start typing a line of code, the editor tries to anticipate what you will type. For example, if you type “Me.” the editor knows that you are about to use one of the current object’s properties or methods.

IntelliSense displays a list of the properties and methods that you might be trying to select. As you type more of the property or method name, IntelliSense scrolls to show the choices that match what you have typed so far.

In Figure 5-4, the code includes the text “Me.set,” so IntelliSense is displaying the current object’s methods that begin with the string “set.”

FIGURE 5-4: IntelliSense displays a list of properties and methods that you might be trying to type.

image

While the IntelliSense window is visible, you can use the up and down arrows to scroll through the list. While IntelliSense is displaying the item that you want to use, you can press the Tab key to accept that item and make IntelliSense type it for you. Press the Escape key to close the IntelliSense window and type the rest manually.

After you finish typing a method and its opening parenthesis, IntelliSense displays information about the method’s parameters. Figure 5-5 shows parameter information for a form object’s SetBounds method. This method takes four parameters: x, y, width, and height.

FIGURE 5-5: IntelliSense displays information about a method’s parameters.

IntelliSense shows a brief ...

Get Visual Basic 2012 Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.