Datasheet

54
CHAPTER 1 VISUAL STUDIO 2010
Additionally, you can follow the example shown here, which is to access the font property for the textbox
and increase the size of the font from the default to 14pt. This was done only to make the sample results
more readable within the screenshots used for the book. It has no other impact on the application.
At this point you have a display that will allow you to show the results from various code snippets simply by
updating the
Text property on the TextBox1 control of your window. Keep in mind that you ll want to remove
(or as some of the chapters will show) comment out code that you are done working with, for example, the
Count property and the related message box code used during the debugging demonstration in this chapter.
USEFUL FEATURES OF VISUAL STUDIO 2010
The focus of most of this chapter has been on creating a simple application, working in either Visual Basic
2010 Express Edition or Visual Studio 2010. It s now time to completely leave the set of features supported
by the Express Edition and move on to some features that are available only to Visual Studio developers.
These features include, but are not limited to, the following items, beginning with features available to all
Visual Studio 2010 developers.
When Visual Studio 2010 is fi rst started, you confi gure your custom IDE profi le. Visual Studio enables
you to select either a language - speci c or task - speci c profi le and then change that profi le whenever you
desire.
Confi guration settings are managed through the Tools
Import and Export Settings menu option. This menu
option opens a simple wizard, which fi rst saves your current settings and then allows you to select an alternate
set of settings. By default, Visual Studio ships with settings for Visual Basic, Web development, and C#, to
name a few, but by exporting your settings you can create and share your own custom settings fi les.
The Visual Studio settings fi le is an XML fi le that enables you to capture all your Visual Studio
con guration settings. This might sound trivial, but it is not. This feature enables the standardization of
Visual Studio across different team members. The advantages of a team sharing settings go beyond just a
common look and feel.
Build Confi gurations
Prior to .NET, a Visual Basic project had only one set of properties. There was no way to have one set of
properties for a debug build and a separate set for a release build. As a result, you had to manually change
any environment - specifi c properties before you built the application. This has changed with the introduction
of build confi gurations , which enable you to have different sets of project properties for debug and release
builds.
Visual Studio does not limit you to only two build con gurations. It s possible to create additional custom
con gurations. The properties that can be set for a project have been split into two groups: those that are
independent of build con guration and therefore apply to all build con gurations, and those that apply
only to the active build con guration. For example, the Project Name and Project Location properties are
the same irrespective of what build con guration is active, whereas the code optimization options vary
according to the active build con guration.
The advantage of multiple con gurations is that it s possible to turn off optimization while an application
is in development and add symbolic debug information that helps locate and identify errors. When you are
ready to ship the application, you can switch to the release con guration and create an executable that is
optimized for production.
At the top of Figure 1 - 35 is a drop - down list box labeled Con guration. Typically, four options are listed
in this box: the currently selected con guration, Active; the Debug and Release options; and a fi nal
option, All Con gurations. When changes are made on this screen, they are applied only to the selected
CH001.indd 54CH001.indd 54 4/5/10 11:57:02 AM4/5/10 11:57:02 AM