Datasheet

Figure 1-11: The Project menu’s Add New Item command lets you add a wide
variety of items to the project.
Show All Files — The Show All Files command makes Solution Explorer list files that are nor-
mally hidden. These include resource files corresponding to forms, hidden partial classes such
as designer-generated form code, resource files, and files in the
obj and bin directories that are
automatically created by Visual Studio when it compiles your program. Normally, you don’t
need to work with these files, so they are hidden. Select this command to show them. Select the
command again to hide them.
Add Reference — The Add Reference command displays the dialog shown in Figure 1-12.
Select the category of the external object, class, or library that you want to find. For a .NET
component, select the .NET tab. For a Component Object Model (COM) component such as an
ActiveX library or control built using Visual Basic 6, select the COM tab. Select the Projects tab
to add a reference to another Visual Studio project. Click the Browse tab to manually locate the
file you want to reference.
Scroll through the list of references until you find the one you want and select it. You can use
Shift+Click and Ctrl+Click to select more than one library at the same time. When you have
made your selections, click OK to add the references to the project. After you have added a ref-
erence to the project, your code can refer to the reference’s public objects. For example, if the
file
MyMathLibrary.dll defines a class named MathTools and that class defines a public
function
Fibonacci, a project with a reference to this DLL could use the following code.
Dim math_tools As New MyMathLibrary.MathTools
MsgBox(“Fib(5) = “ & math_tools.Fibonacci(5))
Add Web Reference — The Add Web Reference command displays the dialog box shown in
Figure 1-13. You can use this dialog box to find web services and add references to them so
your project can invoke them across the Internet.
WindowsApplication1 Properties — This command displays the application’s property pages
shown in Figure 1-14.
17
Chapter 1: IDE
37055c016.qxd 4/8/07 12:46 PM Page 17