The Visual Studio IDE includes editors for many different kinds of documents, including several different kinds of code. For example, it has HyperText Markup Language (HTML), eXtensible Markup Language (XML), eXtensible Application Markup Language (XAML), and Visual Basic editors. These editors share some common features, such as displaying comments and keywords in different colors.
As a Visual Basic developer, you will use the Visual Basic code editor frequently, so you should spend a few minutes learning about its specialized features. The most obvious feature of the code editor is that it lets you type code into a module, but the code editor is far more than a simple text editor such as Notepad. It provides many features to make writing correct Visual Basic code easier.
This chapter describes some of the most important of these features. Many of these tools are invaluable for understanding and navigating through the code so, even if you have worked with Visual Studio before, you should take some time to read through this chapter and experiment with the tools it describes.
Figure 5-1 shows the code editor displaying some Visual Basic code at run time. To make referring to the code lines easier, this figure displays line numbers. To display line numbers, invoke the Tools menu’s Options command, navigate to the Text Editor ⇒ Basic ⇒ General page, and check the Line Numbers box.