Welcome Application. Introducing the Visual Studio.NET IDE. Objectives. Outline

Similar documents
Tutorial 2 - Welcome Application Introducing, the Visual Studio.NET IDE

Dive Into Visual C# 2008 Express

Introduction to the Visual Studio.NET Integrated Development Environment IDE. CSC 211 Intermediate Programming

Tutorial 3 - Welcome Application

Program and Graphical User Interface Design

ekaizen Lessons Table of Contents 1. ebook Basics 1 2. Create a new ebook Make Changes to the ebook Populate the ebook 41

Dive Into Visual C# 2010 Express

Microsoft Word 2011: Basic Tutorial

Microsoft How to Series

Microsoft Excel 2010 Basic

2 USING VB.NET TO CREATE A FIRST SOLUTION

A Guided Tour of Doc-To-Help

INTRODUCTION TO VISUAL BASIC 2010

2 The Stata user interface

Getting started 7. Setting properties 23

Discovering Computers & Microsoft Office Office 2010 and Windows 7: Essential Concepts and Skills

Introduction to PowerPoint

Introductionto the Visual Basic Express 2008 IDE

Table of Contents Lesson 1: Introduction to the New Interface... 2 Lesson 2: Prepare to Work with Office

MICROSOFT OFFICE. Courseware: Exam: Sample Only EXCEL 2016 CORE. Certification Guide

NiceForm User Guide. English Edition. Rev Euro Plus d.o.o. & Niceware International LLC All rights reserved.

Contents. Launching Word

OpenForms360 Validation User Guide Notable Solutions Inc.

Excel Select a template category in the Office.com Templates section. 5. Click the Download button.

Microsoft Word 2010 Lesson Plan

LESSON A. The Splash Screen Application

Microsoft Word 2016 LEVEL 1

Lesson 1: Getting Started with

User Guide. Web Intelligence Rich Client. Business Objects 4.1

Outlook Web Access. In the next step, enter your address and password to gain access to your Outlook Web Access account.

Outlook Quick Start Guide

A Quick Tour GETTING STARTED WHAT S IN THIS CHAPTER?

Budget Exercise for Intermediate Excel

WINDOWS NT BASICS

Get Started. Estimating Explorer

Getting Help in Microsoft Office

Getting started 7. Setting properties 23

Excel 2007 New Features Table of Contents

Creating custom reports is for advanced users only. It is the sole responsibility of the user to debug any custom reports.

Microsoft PowerPoint 2007 Tutorial

Outlook 2003, Level 2 Page 1

Part I. Integrated Development Environment. Chapter 2: The Solution Explorer, Toolbox, and Properties. Chapter 3: Options and Customizations

PowerPoint Spring 2002

NSCC SUMMER LEARNING SESSIONS MICROSOFT OFFICE SESSION

Lesson 1: Getting Familiar with Microsoft Word 2007 for Windows

Introduction to Windows

Getting Familiar with Microsoft Word 2010 for Windows

Forms/Distribution Acrobat X Professional. Using the Forms Wizard

Interface. 2. Interface Adobe InDesign CS2 H O T

Word 2013 Quick Start Guide

Section 1 Getting Started

[ Getting Started with Analyzer, Interactive Reports, and Dashboards ] ]

Sage Getting Started Guide. September 2017

PowerPoint Essentials 1

GAZIANTEP UNIVERSITY INFORMATICS SECTION SEMETER

Content Author's Reference and Cookbook

KODAK Software User s Guide. Software Version 9.0

11.1 Create Speaker Notes Print a Presentation Package a Presentation PowerPoint Tips... 44

Navigate to Cognos Cognos Analytics supports all browsers with the exception of Microsoft Edge.

Quick Guide FAST HR. For more resources, including a guide on FAST HR codes, visit # Instructions Screenshot

PowerPoint Basics (Office 2000 PC Version)

Chapter11 practice file folder. For more information, see Download the practice files in this book s Introduction.

EXCEL 2003 DISCLAIMER:

PowerPoint Essentials

Understanding Word Lesson 1

Excel 2016 Basics for Mac

Word Select New in the left pane. 3. Select Blank document in the Available Templates pane. 4. Click the Create button.

Working with PDF s. To open a recent file on the Start screen, double click on the file name.

Concordance Basics. Part I

Unit III: Working with Windows and Applications. Chapters 5, 7, & 8

Handout Objectives: a. b. c. d. 3. a. b. c. d. e a. b. 6. a. b. c. d. Overview:

Outlook 2007 Web Access User Guide

DRAFT. Table of Contents About this manual... ix About CuteSITE Builder... ix. Getting Started... 1

Study Guide. PCIC 3 B2 GS3- Key Applications-Excel. Copyright 2010 Teknimedia Corporation

Section 2 Getting Started

Enterprise Architect. User Guide Series. Tutorial. Author: Sparx Systems. Date: 26/07/2018. Version: 1.0 CREATED WITH

MockupScreens - User Guide

Skills Exam Objective Objective Number

ECDL Module 6 REFERENCE MANUAL

Introduction Accessing MICS Compiler Learning MICS Compiler CHAPTER 1: Searching for Data Surveys Indicators...

Application of Skills: Microsoft Excel 2013 Tutorial

Empty the Recycle Bin Right Click the Recycle Bin Select Empty Recycle Bin

Microsoft Excel Level 1

MICROSOFT POWERPOINT BASIC WORKBOOK. Empower and invest in yourself

Computer Basics Written by Brian O'Rooney. Copyright 2000 Nanaimo Literacy Association All rights reserved

Business Insight Authoring

Enterprise Architect. User Guide Series. Tutorial

Microsoft Windows XP. Operating System. Starting Windows XP. You might be asked to enter your username and password

Table of Contents. 1. Creating a Microsoft Excel Workbook...1 EVALUATION COPY

LESSON B. The Toolbox Window

Using Microsoft Excel

ListPro. Users Guide and Reference. Ilium Software. for Windows PCs, Windows Mobile, and iphone. Version 5.1

Skill Exam Objective Objective Number

1. Math symbols Operation Symbol Example Order

Microsoft Windows 7 - Illustrated Unit A: Introducing Windows 7

Outlook basics. Identify user interface elements that you can use to accomplish basic tasks.

GraphWorX64 Productivity Tips

Handout created by Cheryl Tice, Instructional Support for Technology, GST BOCES

Lehigh University Library & Technology Services

Excel 2010 Level 1: The Excel Environment

Transcription:

2 T U T O R I A L Objectives In this tutorial, you will learn to: Navigate Visual Studio.NET s Start Page. Create a Visual Basic.NET solution. Use the IDE s menus and toolbars. Manipulate windows in the Visual Studio.NET IDE. Use the Auto Hide feature. Use the Visual Studio.NET IDE s help features. Close a Visual Basic.NET solution. Outline 2.1 Test-Driving the Welcome Application 2.2 Overview of the Visual Studio.NET IDE 2.3 Creating a Project for the Welcome Application 2.4 Menu Bar and Toolbar 2.5 Visual Studio.NET IDE Windows 2.6 Auto Hide 2.7 Using Help 2.8 Saving and Closing Solutions in Visual Studio.NET 2.9 Internet and Web Resources 2.10 Wrap-Up Welcome Application Introducing the Visual Studio.NET IDE Visual Studio.NET is Microsoft s Integrated Development Environment (IDE) for creating and running applications written in.net programming languages, such as Visual Basic.NET. The IDE allows you to create applications by dragging and dropping existing building blocks into place a technique, called visual programming greatly simplifying application development. In this tutorial, you will learn the Visual Studio.NET IDE features that you will need to create Visual Basic.NET applications. 2.1 Test-Driving the Welcome Application In this section, you continue learning with our APPLICATION-DRIVEN approach as you prepare to build an application that displays a welcome message and a picture. Your application must meet the following requirements: Application Requirements A software company (Deitel & Associates) has asked you to develop a Visual Basic.NET application that will display the message Welcome to Visual Basic.NET! and a picture of the company s bug mascot. To build this application, you must first familiarize yourself with the Visual Studio.NET IDE. In this tutorial, you will begin to develop the Welcome application. Then, in Tutorial 3, you will put it all together and create the Welcome application by following our step-by-step boxes. [Note: Our convention is to display application names in the Helvetica font.] You begin by test-driving the completed Welcome application. 18

Introducing the Visual Studio.NET IDE Tutorial 2 19 Test-Driving the Welcome Application 1. Checking your setup. Confirm that you have set up your computer properly by reading the For Students and Instructors: Important Information before You Begin section in the Preface. 2. Locating the Welcome application. Open Windows Explorer, and navigate to the C:\Examples\Tutorial02 folder (Fig. 2.1). Contents of C:\Examples\ Tutorial02 Figure 2.1 Contents of C:\Examples\Tutorial02. 3. Executing the application. Double click Welcome.exe (Fig. 2.1) to execute the application. Figure 2.2 shows the application executing. Close box Figure 2.2 Welcome application executing. 4. Closing the application. Close the executing application by clicking the close box,. 2.2 Overview of the Visual Studio.NET IDE This section introduces you to the Visual Studio.NET IDE. To begin, be certain that you have Visual Studio.NET installed on your computer. Then, find Visual Studio.NET, and open it; the Start Page displays (Fig. 2.3).

20 Tutorial 2 Welcome Application Start Page Start Page links Page loaded when Get Started is clicked (This page also is displayed when the Start Page is loaded) Buttons Empty project list Figure 2.3 Start Page in Visual Studio.NET. Depending upon your version of Visual Studio.NET, the Start Page might look different from the image in Fig. 2.3. The left side of the Start Page contains some helpful links, such as Get Started, What s New and Online Community. When you click a link, your computer will display information related to that link. The vast majority of the topics in these links will be more useful to you once you have gained some programming experience. For this book, you use only the Get Started link. Many of the Start Page links require that your computer be connected to the Internet. The following items describe each of the links on the Start Page: Clicking the Get Started link loads a page that contains a table listing the names of recent projects (such as WageCalculator and ASimpleProgram in Fig. 2.4), along with the dates on which these projects were last changed (modified). A project is a group of related files and images that make up an application. When you load Visual Studio.NET for the first time, the list of recent projects is empty. There are two Buttons on the page Open Project and New Project, which are used to open existing projects (such as the ones in the table of recent projects) and to create projects, respectively.

Introducing the Visual Studio.NET IDE Tutorial 2 21 Navigation Buttons Location bar Recent projects Hidden windows (Server Explorer and Toolbox) ASimpleProgram project Figure 2.4 Start Page in Visual Studio.NET. Clicking the What s New link displays a page that lists new features and updates for Visual Studio.NET, including downloads for Visual Basic.NET samples and programming tools. Information is updated frequently on this page. Online Community links to online resources for contacting other software developers through newsgroups (organized message boards on the Internet), user groups and Web sites. Clicking Headlines displays a page for browsing articles, news and tips for developing applications using Microsoft technologies. To access more extensive information, you can select Search Online and begin browsing through the Microsoft Developer Network (MSDN) online library, which contains articles and tutorials on technologies of interest to Visual Basic.NET programmers. When clicked, Downloads displays a page that provides you with access to product updates, code samples and reference materials. The XML Web Services page provides you with information about Web services, which are reusable pieces of Web-based software available on the Internet. The Web Hosting page allows you to post software (such as Web services) online for public use. Clicking the My Profile link loads a page where you can adjust and customize various Visual Studio.NET settings, such as the location where various windows should appear in the IDE. You also can browse the Web from Visual Studio.NET by using Microsoft s Internet Explorer (also called the internal Web browser in Visual Studio.NET). For example, type www.deitel.com into the location bar (Fig. 2.5), and press the Enter key. This causes the DEITEL home page to be displayed within the Visual Studio.NET IDE (Fig. 2.6). Click the left-arrow Button (in the set of navigation

22 Tutorial 2 Welcome Application Buttons from Fig. 2.4) to return to the Start Page. Other windows appear in the IDE in addition to the Start Page; we discuss several of them later in this tutorial. Entering www.deitel.com in the location bar Figure 2.5 Web site (www.deitel.com) being entered in the location bar. Figure 2.6 DEITEL home page displayed in the Visual Studio.NET IDE. (Courtesy of Deitel & Associates, Inc.) SELF-REVIEW 1. When you first open Visual Studio.NET, the displays. a) What s New Page b) Start Page c) Welcome Page d) none of the above

Introducing the Visual Studio.NET IDE Tutorial 2 23 2. Clicking the link in the Visual Studio.NET Start Page loads a page that contains a table listing the names of recent projects. a) My Profile b) Web Hosting c) Get Started d) What s New Answers: 1) b. 2) c. 2.3 Creating a Project for the Welcome Application In this section, you will create a simple Visual Basic.NET Windows application. The Visual Studio.NET IDE organizes applications into projects and solutions, which contain one or more projects. Every application always contains exactly one solution. Large-scale applications can contain many projects, in which each project performs a single, well-defined task (Fig. 2.7). In this book, each solution you build will contain only one project. Solution Project Project Solution Project Solution Project Project Project Figure 2.7 Solutions can contain one or more projects. Creating a Project for the Welcome Application 1. Creating a new project. If you have not already done so, start Visual Studio.NET. On the Start Page, click the New Project Button (Fig. 2.8), causing the New Project dialog to display (Fig. 2.9). Dialogs are windows that can display information for, and gather information from, the application s user. Like other windows, dialogs are identified by the text in their title bar. Figure 2.8 New Project Button. New Project Button

24 Tutorial 2 Welcome Application (cont.) Title bar (displaying New Project) Visual Basic Projects folder (selected) Visual Basic.NET Windows Application (selected) Project Types: pane Location of the new project Templates: pane Description of project selected in Templates: pane Default project and solution name Figure 2.9 New Project dialog. 2. Selecting the project type. The Visual Studio.NET IDE allows you to choose from one of several languages (Visual Basic.NET, Visual C# and Visual C++.NET) in which to program. Click the Visual Basic Projects folder in the Project Types: pane (Fig. 2.10) to display the list of Visual Basic.NET project types in the Templates: pane. (Templates are building blocks for different types of Visual Basic.NET applications.) [Note: Depending on your version of Visual Studio.NET, the names and number of items shown in the Project Types: and Templates: panes could differ.] Updated project location Updated project and solution name Browse... Button Figure 2.10 New Project dialog with updated project information. 3. Selecting the template. Select Windows Application, which is a template for an application that executes on machines running Microsoft Windows. Examples of Windows applications include computer games and software products like Microsoft Word, Internet Explorer and Visual Studio.NET. In this book, you concentrate on Windows Applications. In the last tutorials, you will also build ASP.NET Web Applications.

Introducing the Visual Studio.NET IDE Tutorial 2 25 (cont.) 4. Changing the name of the project. By default, the Visual Studio.NET IDE assigns the name WindowsApplication1 to the project and solution (Fig. 2.9) and places these files in a folder named WindowsApplication1. When a project is created in Visual Studio.NET for the first time, Visual Studio.NET places the WindowsApplication1 folder in the C:\My Documents directory. You can change both the project s name and location. To rename the project, type Welcome in the Name: TextBox (Fig. 2.10). 5. Changing the location of the project. Save this project in your SimplyVB directory. To change the project s location, click the Browse... Button (Fig. 2.10) to display the Project Location dialog (Fig. 2.11). In this dialog, locate your SimplyVB directory, and click Open. After providing the project s name and location in the New Project dialog, click OK. This displays the IDE in design view (Fig. 2.12), which contains the features you need to begin creating a Windows application. SimplyVB directory (selected) Open Button Figure 2.11 Project Location dialog. Tabs Solution Explorer Menu bar Active tab Form (Windows application) titled Form1 Properties window Figure 2.12 Design view of Visual Studio.NET. The name of each open file is listed on a tab (Start Page and Form1.vb [Design] in Fig. 2.12). To view a file, click its tab. Tabs provide easy access to multiple files. The active tab is displayed in bold text (Form1.vb [Design] in Fig. 2.12). The contents of the Form1.vb [Design] tab, which includes the gray rectangle (called a Form), is the Windows Form Designer. The Form (titled Form1) represents

26 Tutorial 2 Welcome Application the Windows application that you are creating. Forms can be enhanced by adding controls such as Buttons. Together, the Form and controls make up the application s graphical user interface (GUI), which is the visual part of the application. Users enter data (inputs) into the application by typing at the keyboard, by clicking the mouse buttons and in a variety of other ways. Applications display instructions and other information (outputs) for users to read in the GUI. For example, the New Project dialog in Fig. 2.9 is a GUI in which users click with the mouse to select project types and input project names and locations from the keyboard. GUI controls (such as Buttons) aid both (1) in data entry by users and (2) in formatting and presenting data outputs to users. For example, Internet Explorer (Fig. 2.13) displays Web pages requested by users. Internet Explorer s GUI has a menu bar that contains six menus: File, Edit, View, Favorites, Tools and Help. These menus allow users to print files, save files and more. Below the menu bar is a toolbar that contains Buttons. Each Button contains an image (called an icon) that identifies the Button. When clicked, toolbar Buttons execute tasks (such as printing and searching). Beneath the toolbar is a ComboBox in which users can type the locations of Web sites to visit. Users also can click the ComboBox s drop-down arrow to select Web sites that they have visited previously. To the left of the ComboBox is a Label (Address) that identifies the purpose of the ComboBox. The menus, Buttons and Label are part of Internet Explorer s GUI; they allow users to interact with the Internet Explorer application. Although not part of Internet Explorer s GUI, the Web page s TextBox at the bottom of Fig. 2.13 displays the text <e-mail> and allows users to input data. Using Visual Basic.NET, you can create your own applications that have all the GUI controls shown in Fig. 2.13 and many more. Menu (Help) Button (displaying an icon) ComboBox Drop-down arrow Title bar Menu bar Toolbar Label Web site requested by user Textbox Figure 2.13 Internet Explorer window with GUI controls labeled. (Web site content courtesy of Deitel & Associates, Inc.) SELF-REVIEW 1. The visual part of the application with which users interact is the application s. a) graphical user interface b) project c) solution d) title bar

Introducing the Visual Studio.NET IDE Tutorial 2 27 2. A contains one or more projects that collectively form a Visual Basic.NET application. a) dialog b) Form c) solution d) GUI Answers: 1) a. 2) c. 2.4 Menu Bar and Toolbar Visual Basic.NET programmers use menus (located on the Visual Studio.NET IDE menu bar shown in Fig. 2.14) that contain commands for managing the IDE and for developing and executing applications. Each menu has a group of related commands (also called menu items) that, when selected, cause the IDE to perform specific actions such as opening windows, saving files, printing files and executing applications. For example, to display the Toolbox window, select View > Toolbox. The menus in Fig. 2.14 are summarized in Fig. 2.15 you will learn to use many of these menus throughout the book. In Tutorial 22, Typing Application (Introducing Keyboard Events, Menus and Dialogs), you learn how to create and add your own menus and menu items to your applications. Figure 2.14 Visual Studio.NET IDE menu bar. Menu File Edit View Project Build Debug Data Format Tools Window Help Figure 2.15 Description Contains commands for opening and closing projects, printing project data, etc. Contains commands such as Cut, Paste, Undo, etc. Contains commands for displaying IDE windows and toolbars. Contains commands for managing a solution s projects and their files. Contains commands for compiling a Visual Basic.NET application. Contains commands for identifying and correcting problems in applications. Also contains commands for running applications. Contains commands for interacting with databases, which store the data that an application processes. [Note: You will learn database concepts in Tutorial 25, ATM Application.] Contains commands for aligning and spacing a Form s controls. Contains commands for accessing additional IDE tools and options that enable customization of the IDE. Contains commands for hiding, opening, closing and displaying IDE windows. Contains commands for accessing the IDE s help features. Visual Studio.NET IDE menu summary. Rather than navigating the menus for certain commonly used commands, you can access those same commands from the IDE toolbar (Fig. 2.16). To execute a command via the IDE toolbar, simply click its icon. Some icons have associated down arrows that, when clicked, display additional commands.

28 Tutorial 2 Welcome Application Toolbar icon indicates a command to open a project or solution Down arrow indicates additional commands are available Toolbar Figure 2.16 IDE toolbar. Positioning the mouse pointer over an icon highlights the icon and, after a few seconds, displays a description called a tool tip (Fig. 2.17). Tool tips help you become familiar with the IDE s features. Tool tip displayed when the mouse pointer has rested on the icon for a few seconds Figure 2.17 Tool-tip demonstration. SELF-REVIEW 1. contain groups of related commands. a) Menu items b) Menus c) Tool tips d) None of the above 2. When the mouse pointer is positioned over an IDE toolbar icon for a few seconds, a is displayed. a) toolbox b) toolbar c) menu d) tool tip Answers: 1) b. 2) d. 2.5 Visual Studio.NET IDE Windows The IDE provides windows for accessing project files and for customizing forms and controls by changing their attributes (names, colors, etc.). These windows provide visual aids for common programming tasks, such as managing files in a project. In this section, you will become familiar with several windows Solution Explorer, Properties and Toolbox that are essential for creating Visual Basic.NET applications. You can access these windows by using the IDE toolbar icons (Fig. 2.18) or by selecting the window name, using the View menu. Properties icon Solution Explorer icon Toolbox icon Figure 2.18 Toolbar icons for three Visual Studio.NET IDE windows. Solution Explorer The Solution Explorer window (located on the right side of the IDE as shown in Fig. 2.12) provides access to solution files. This window allows you to manage files visually. The Solution Explorer window displays a list of all the files in a project and all projects in a solution. (Remember that a Visual Basic.NET solution can contain one or more projects.) When the Visual Studio.NET IDE is first loaded, the Solu-

Introducing the Visual Studio.NET IDE Tutorial 2 29 tion Explorer window is empty; there are no files to display. Once a solution is open, the Solution Explorer window displays that solution s contents. Figure 2.19 displays the solution contents for the Welcome application. Toolbar Expanded node (Minus box collapses node when clicked) Form file Properties window icon Project name Collapsed node (Plus box expands node when clicked) Figure 2.19 Solution Explorer with an open solution. For your single-project solution, Welcome is the only project. The file, which corresponds to the Form shown in Fig. 2.12, is named Form1.vb. (Visual Basic.NET Form files use the.vb file name extension, which is short for Visual Basic. ) The plus and minus boxes to the left of both the project name and the References folder are called nodes. The plus and minus boxes expand and collapse information, respectively. (See the box, Navigating a Project with the Solution Explorer.) Navigating a Project with the Solution Explorer 1. Collapsing a node. Click the minus box to the left of the project name to collapse the node (Fig. 2.20). The minus box now becomes a plus box (Fig. 2.21). Expanded node (minus box) Project name (selected) Figure 2.20 Expanded node. Collapsed node (plus box) Solution name (selected) Figure 2.21 Collapsed node. 2. Expanding a node. Click the plus box to the left of the project name to expand the node. The Solution Explorer window should again look like Fig. 2.20. Toolbox Using visual programming, you can drag and drop controls onto the Form quickly and easily instead of building them from scratch, which is a slow and complex process. Just as you do not need to know how to build an engine to drive a car, you do not need to know how to build controls to create effective GUIs. The Toolbox (Fig. 2.22) contains a wide variety of controls for building GUIs. You will use the

30 Tutorial 2 Welcome Application Toolbox as you finish creating the Welcome application in Tutorial 3. If the Toolbox is not visible, select View > Toolbox. Tabs Scroll arrow (disabled) Controls Additional Windows Forms tab controls (displayed after the down-scroll arrow has been clicked several times) Tabs Scroll arrow (enabled) Figure 2.22 Toolbox displaying the contents of the Windows Forms tab. The Toolbox contains five tabs (three at the top and two at the bottom) that group related controls: Data, Components, Windows Forms, Clipboard Ring and General. In this book, you will use only the Windows Forms tab controls and Data tab controls. When you click a tab, the Toolbox displays all of the controls in that group. You can scroll through the controls using the black scroll arrows to the right of the Windows Forms and Clipboard Ring tabs. When there are no more controls to display, the scroll arrow becomes gray, meaning that it is disabled. (It will not perform its normal function if clicked or held down.) The first item in the group is not a control it is the mouse pointer. You will use the mouse pointer to navigate the IDE and to manipulate the Form and its controls. In the remaining tutorials, you will use approximately 20 of the Toolbox s 47 controls. Properties Window One of the windows you will use frequently is the Properties window, which displays the properties for Form and control objects. Properties specify an object s attributes, such as the size, color and position of a control object. The Properties window allows you to set object properties visually, without writing code. Setting properties visually provides a number of benefits: You can see which properties can be modified and, in many cases, you can learn the acceptable values for a given property.

Introducing the Visual Studio.NET IDE Tutorial 2 31 You do not have to remember or search the Visual Studio.NET documentation (see Section 2.7) for a property s settings. This window displays a brief description of the selected property, so you can understand the property s purpose. A property can be set quickly. All of these features are designed to help you ensure that settings are correct and consistent throughout the project. If the Properties window is not visible, select View > Properties Window. Figure 2.23 shows a Form s Properties window: Object s name (Form1) Object s class (System.Windows.Forms.Form) Component object box Categorized icon Down arrow for selecting Form or control objects Toolbar Alphabetic icon Selected property Design catagory Scrollbar Scrollbox Description of selected property Properties (left column) Figure 2.23 Property values (right column) Properties window displaying a Form s properties. Each Form or control object has its own set of properties. At the top of the Properties window is the component object box, which allows you to select the object whose properties you wish to display in the Properties window. You can confirm that you are manipulating the correct object s properties because the object s name and class type are displayed in the component object box. Form objects have class type System.Windows.Forms.Form and are assigned generic names (such as Form1) by Visual Studio.NET. You will learn about the class types for controls in the next tutorial. Icons on the toolbar sort the properties either alphabetically (if you click the alphabetic icon) or categorically (if you click the categorized icon). Figure 2.23 shows the Properties window with its properties sorted categorically. Each gray horizontal bar to the left of the scrollbar is a category that groups related properties. For example, the Design category groups five related properties. The categories visible in Fig. 2.23 are Behavior, Configurations, Data, Design, Focus and Layout. Notice that each category is a node.

32 Tutorial 2 Welcome Application The left column of the Properties window lists the object s property names; the right column displays each property s value. In the next tutorial, you will learn how to set properties for objects. You can scroll through the list of properties by dragging the scrollbar s scrollbox up or down. Whenever you select a property, a description of the property displays at the bottom of the Properties window. SELF-REVIEW 1. The allows you to add controls to the Form in a visual manner. a) Solution Explorer b) Properties window c) Toolbox d) Dynamic Help window 2. The window allows you to view a solution s files. a) Properties b) Solution Explorer c) Toolbox d) None of the above. Answers: 1) c. 2) b. 2.6 Auto Hide Visual Studio.NET provides a space-saving feature used for the Toolbox, Properties and Dynamic Help (Section 2.7) windows, called Auto Hide. When Auto Hide is enabled for one or more of these windows, a toolbar appears along one of the edges of the IDE. (See the box, Using Auto Hide.) Using Auto Hide 1. Displaying a hidden window. When Auto Hide is enabled, the toolbar along one of the edges of the IDE contains one or more tabs, each of which identifies a hidden window (Fig. 2.24). Place the mouse pointer over the Toolbox tab to display the Toolbox (Fig. 2.25). Tabs for hidden windows Figure 2.24 Hidden-window tabs. Title bar Horizontal pin icon (Auto Hide enabled) Mouse pointer over the tab for the Toolbox Toolbox is displayed when the mouse pointer is placed on the tab for the Toolbox Figure 2.25 Displaying a hidden window with Auto Hide enabled. 2. Hiding a window. Move the mouse pointer outside the Toolbox window s area to hide the Toolbox (Fig. 2.26).

Introducing the Visual Studio.NET IDE Tutorial 2 33 (cont.) Mouse pointer outside the tab for the Toolbox (Toolbox window is hidden) Vertical pin icon (Auto Hide is disabled) Figure 2.26 Hiding the Toolbox by moving the mouse pointer outside of Toolbox s area. 3. Disabling Auto Hide. To keep the Toolbox window open and to disable Auto Hide (called pinning down a window), click the pin icon (also called the pushpin icon) in Fig. 2.25 s title bar. Notice that, when a window is pinned down, the pin icon is vertical (Fig. 2.27), whereas, when Auto Hide is enabled, the pin icon is horizontal. Figure 2.27 Pin icon in vertical position. SELF-REVIEW 1. Visual Studio.NET provides a space-saving feature used for the window(s). a) Toolbox b) Properties c) Dynamic Help d) All of the above. 2. When Auto Hide is enabled its pin icon is. a) horizontal b) vertical c) down d) diagonal Answers: 1) d. 2) a. 2.7 Using Help The Visual Studio.NET IDE provides extensive help features. The Help menu commands are summarized in Fig. 2.28. Dynamic help (Fig. 2.29) provides links to articles that apply to the current content (that is, the item selected with the mouse pointer). For example, if you have the Start Page open, Dynamic Help provides links to articles about the Start Page, customizing Dynamic Help and many other topics. To open the Dynamic Help window, select Help > Dynamic Help. Then, when you click a word or object (such as a Form or a control), links to relevant help articles appear in the Dynamic Help window. The window lists help topics, samples and Getting Started information. When you click a link, the help topic appears in a new window. This new window also contains a toolbar that provides access to the Contents..., Index... and Search... help features. Command Contents Index Search Figure 2.28 Description Displays a categorized table of contents in which help articles are organized by topic. Displays an alphabetized list of topics through which you can browse. Allows you to find help articles based on search keywords. Help menu commands.

34 Tutorial 2 Welcome Application Dynamic Help window Selected item Toolbar Search Index Contents Relevant help article links Figure 2.29 Dynamic Help window. SELF-REVIEW 1. displays relevant help articles, based on the selected object. a) Internal help b) Dynamic help c) External help d) Context-driven help 2. Help command displays an alphabetized list of topics through which you can browse. a) Search... b) Browse... c) Contents... d) Index... Answers: 1) b. 2) d. 2.8 Saving and Closing Solutions in Visual Studio.NET Once you are finished with a solution, you will want to save the solution s files and close the solution. Closing the Solution for the Welcome Application 1. Saving the Solution files. Before closing the solution for the Welcome application, you will want to save the solution s files, ensuring that any changes made to the solution s files are not lost. Although you did not make any changes to the solution s files for this particular tutorial, you will be making such changes in most of the tutorials so, for practice, save your solution files by selecting File > Save All. 2. Closing the Solution. To close the solution, select File > Close Solution. 2.9 Internet and Web Resources Please take a moment to visit each of these sites briefly. To save typing time, use the hot links on the enclosed CD or at www.deitel.com. www.msdn.microsoft.com/vstudio This site is the home page for Microsoft Visual Studio.NET. This site includes news, documentation, downloads and other resources.

Introducing the Visual Studio.NET IDE Tutorial 2 35 www.worldofdotnet.net This site offers a wide variety of information on.net, including articles, news and links to newsgroups and other resources. www.vbi.org This site has Visual Basic articles, reviews of books and software, documentation, downloads, links and more. www.msdn.microsoft.com/library/default.asp?url=/library/en-us/ vbcon/html/vbconselectingwfcclientcontrol.asp This Microsoft site summarizes Toolbox controls by function. Each control has a link to a page that contains additional resources for that control. 2.10 Wrap-Up In this tutorial, you were introduced to the Visual Studio.NET integrated development environment (IDE). You learned key features, including tabs, menus, menu bars, toolbars, icons, Auto Hide and much more. You created a Visual Basic.NET Windows application. The application contained one Form object named Form1. Form objects represent the application s graphical user interface (GUI). You worked with the Solution Explorer, Toolbox and Properties windows that are essential to developing Visual Basic.NET applications. The Solution Explorer window allows you to manage your solution s files visually. The Toolbox window contains a rich collection of controls (organized on tabs) that allow you to create GUIs. The Properties window allows you to set the attributes of the Form and controls. You explored Visual Studio.NET s help features, including the Dynamic Help window and the Help menu. The Dynamic Help window displays links related to the item you select with the mouse pointer. You learned about Web sites that provide additional Visual Basic.NET information. In the next tutorial, you will begin creating Visual Basic.NET applications. You will follow step-by-step instructions for completing the Welcome application by using visual programming and the IDE features you learned in this tutorial. SKILLS SUMMARY Viewing a Page that Contains a Table Listing Names of Recent Projects Click the Start Page s Get Started link. Viewing a Page that Lists New Features and Updates for Visual Studio.NET Click the Start Page s What s New link. Viewing a Page that Lists Online Resources for Contacting Other Software Developers Click the Start Page s Online Community link. Viewing a Page that Lists News, Articles and Tips for Developing Microsoft Applications Click the Start Page s Headlines link. Viewing a Page that Allows Browsing of the Microsoft Developer Network (MSDN) Web Site Click the Start Page s Search Online link. Viewing a Page that Lists Product Updates, Code Samples and Reference Materials Click the Start Page s Downloads link. Viewing a Page that Allows You to Customize Visual Studio.NET Settings Click the Start Page s My Profile link. Creating a New Project Click the Start Page s New Project Button to display the New Project dialog.

36 Tutorial 2 Welcome Application Select Visual Basic Projects in the Project Types: pane. Select Windows Application in the Templates: pane. Provide the project s name in the Name: TextBox. Provide the project s directory information in the Location: TextBox. Click the OK Button. Saving a Project Select File > Save All. Viewing a Tool Tip for a Visual Studio.NET Icon Place the mouse pointer on the icon, and keep it there until the tool tip appears. Collapsing a Node in the Solution Explorer Click the node s minus box. Expanding a Node in the Solution Explorer Click the node s plus box. Scrolling Through the List of Windows Forms Controls in the Toolbox Click the scroll arrows. Viewing the Properties Window Select View > Properties Window. Displaying a Hidden Window Place the mouse pointer over the hidden window s tab. Disabling Auto Hide and Pinning Down a Window Click the window s horizontal pin icon to change it to a vertical pin icon. Enabling Auto Hide Click the window s vertical pin icon to change it to a horizontal pin icon. Opening the Dynamic Help Window Select Help > Dynamic Help. KEY TERMS active tab The tab of the document displayed in the IDE. alphabetic icon The icon in the Properties window that, when clicked, sorts properties alphabetically. Auto Hide A space-saving IDE feature used for windows such as Toolbox, Properties and Dynamic Help that hides a window until the mouse pointer is placed on the hidden window's tab. categorized icon The icon in the Properties window that, when clicked, sorts properties categorically. component object box The ComboBox at the top of the Properties window that allows you to select the Form or control object whose properties you want set. Contents... command The command that displays a categorized table of contents in which help articles are organized by topic. Data menu The menu that contains commands for interacting with databases. Debug menu The menu that contains commands for debugging and running an application. design view The Visual Studio.NET view that contains the features necessary to begin creating Windows applications. dialog A window that can display and gather information. dynamic help A help option that provides links to articles that apply to the current content (that is, the item selected with the mouse pointer). Form The object that represents the Windows application s graphical user interface (GUI). graphical user interface (GUI) The visual components through which users interact with applications.

Introducing the Visual Studio.NET IDE Tutorial 2 37 icon The graphical representation of commands in the Visual Studio.NET IDE. Integrated Development Environment (IDE) The software used to create, document, run and debug applications. internal Web browser Web browser (Internet Explorer) included in Visual Studio.NET, with which you can browse the Web. location bar The ComboBox in Visual Studio.NET where you can enter the name of a Web site to visit. menu A group of related commands. menu item A command located in a menu that, when selected, causes an application to perform a specific action. Microsoft Developer Network (MSDN) An online library that contains articles, downloads and tutorials on technologies of interest to Visual Studio.NET developers. minus box The icon that, when clicked, collapses a node. New Project dialog A dialog that allows you to choose which type of application you wish to create. pin icon An icon that enables or disables the Auto Hide feature. plus box An icon that, when clicked, expands a node. project A group of related files that compose an application. Properties window The window that displays the properties for a Form or control object. property Specifies a control or Form object s attributes, such as size, color and position. solution Contains one or more projects. Solution Explorer A window that provides access to all the files in a solution. Start Page The initial page displayed when Visual Studio.NET is opened. tool tip The description of an icon that appears when the mouse pointer is held over that icon for a few seconds. toolbar A bar that contains Buttons that execute commands. toolbar icon A picture on a toolbar Button. Toolbox A window that contains controls used to customize Forms. Tools menu A menu that contains commands for accessing additional IDE tools and options that enable customization of the IDE. Visual Studio.NET Microsoft s integrated development environment (IDE), which allows developers to create applications in a variety of.net programming languages. Windows application An application that executes on a Windows operating system. MULTIPLE-CHOICE QUESTIONS 2.1 The integrated development environment is used for creating applications written in.net programming languages such as Visual Basic.NET. a) Solution Explorer b) Gates c) Visual Studio.NET d) Microsoft 2.2 The.vb file name extension indicates a. a) Visual Basic file b) dynamic help file c) help file d) very big file 2.3 The pictures on toolbar Buttons are called. a) prototypes b) icons c) tool tips d) tabs 2.4 The allows programmers to modify controls visually, without writing code. a) Properties window b) Solution Explorer c) menu bar d) Toolbox

38 Tutorial 2 Welcome Application 2.5 The hides the Toolbox when the mouse pointer is moved outside the Tool- Box s area. a) component-selection feature b) Auto Hide feature c) pinned command d) minimize command 2.6 A appears when the mouse pointer is positioned over an IDE toolbar icon for a few seconds. a) drop-down list b) menu c) tool tip d) down arrow 2.7 The Visual Studio.NET IDE provides. a) help documentation b) a toolbar c) windows for accessing project files d) All of the above 2.8 The contains a list of helpful links, such as Get Started and Online Community. a) Solution Explorer window b) Properties window c) Start Page d) Toolbox link 2.9 The Properties window contains. a) the component object box b) a Solution Explorer c) menus d) a menu bar 2.10 A can be enhanced by adding reusable components such as Buttons. a) control b) Form c) tab d) property 2.11 For Web browsing, Visual Studio.NET includes. a) Web View b) Excel c) a Web tab d) Internet Explorer 2.12 An application s GUI can include. a) toolbars b) icons c) menus d) All of the above 2.13 The does not contain a pin icon. a) Dynamic Help window b) Solution Explorer window c) Toolbox window d) active tab 2.14 When clicked, in the Solution Explorer window will expand nodes and will collapse nodes. a) minus boxes; plus boxes b) plus boxes; minus boxes c) up arrows; down arrows d) left arrows; right arrows 2.15 Form specify attributes such as size and position. a) nodes b) inputs c) properties d) title bars EXERCISES 2.16 (Closing and Opening the Start Page) In this exercise, you will learn how to close and reopen the Start Page. To accomplish this task, perform the following steps: a) Close Visual Studio.NET if it is open by selecting File > Exit. b) Start Visual Studio.NET. c) Close the Start Page by clicking its close box (Fig. 2.30).

Introducing the Visual Studio.NET IDE Tutorial 2 39 Close box Figure 2.30 Closing the Start Page. d) Select Help > Show Start Page to display the Start Page. 2.17 (Enabling Auto Hide for the Solution Explorer Window) In this exercise, you will learn how to use the Solution Explorer window s Auto-Hide feature by performing the following steps: a) Open the Start Page. b) In the Get Started page (displayed by default), click the Open Project Button to display the Open Project dialog. You can skip to step e) if the Welcome application is already open. c) In the Open Project dialog, navigate to C:\SimplyVB\Welcome, and click Open. d) In the Open Project dialog, select Welcome.sln, and click Open. e) Position the mouse pointer on the vertical pin icon in the Solution Explorer window s title bar. After a few seconds, a tool tip appears displaying the words Auto Hide (Fig. 2.31). Vertical pin icon Figure 2.31 Enabling Auto Hide. f) Click the vertical pin icon. This action causes a Solution Explorer tab to appear on the right side of the IDE. The vertical pin icon changes to a horizontal pin icon (Fig. 2.32). Auto Hide has now been enabled for the Solution Explorer window. Horizontal pin icon Solution Explorer tab Figure 2.32 Solution Explorer window with Auto Hide enabled. g) Position the mouse pointer outside the Solution Explorer window to hide the window. h) Position the mouse pointer on the Solution Explorer tab to view the Solution Explorer window. 2.18 (Sorting Properties Alphabetically in the Properties Window) In this exercise, you will learn how to sort the Properties window s properties alphabetically by performing the following steps: a) Open the Welcome application by performing steps a) through d) of Exercise 2.17. If the Welcome application is already open, you can skip this step.

40 Tutorial 2 Welcome Application b) Locate the Properties window. If it is not visible, select View > Properties Window to display the Properties window. c) To sort properties alphabetically, click the Properties window s alphabetic icon (Fig. 2.33). The properties will display in alphabetic order. Alphabetic icon Figure 2.33 Sorting properties alphabetically.