© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 2.1 Test-Driving the Welcome Application 2.2 Overview of the Visual Studio.NET 2003 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 Tutorial 2 - Welcome Application Introducing, the Visual Studio ®.NET IDE
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 2 Objectives In this tutorial, you will learn to: –Navigate Visual Studio.NET’s Start Page. –Create a C# 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 C# solution.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test-Driving the Welcome Application
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test-Driving the Welcome Application Opening the application –Locate the directory –Double click the executable (.exe ) file Figure 2.1 Contents of C:\Examples\Tutorial02. Contents of C:\Examples\Tutorial02
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test-Driving the Welcome Application Figure 2.2 Welcome application running. Close box
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test-Driving the Welcome Application Application running –Click close box to close application
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Overview of the Visual Studio.NET IDE Figure 2.3 Start Page in Visual Studio.NET. Button s Start Page Empty project listPage loaded when Projects tab is clicked (This page also is displayed when the Start Page is loaded)
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Overview of the Visual Studio.NET IDE Start Page –Opened when Visual Studio.NET is opened –Contains helpful links –Allows creation or opening of a project –Displays recent projects
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Overview of the Visual Studio.NET IDE Figure 2.4 Start Page in Visual Studio.NET. Recent projects Welcome Project Hidden windows ( Toolbox and Server Explorer )
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Overview of the Visual Studio.NET IDE Start Page –Allows Web browsing Contains internal Web browser Location bar specifies Web page to visit Navigation Button s provided for convenient navigation –Hides windows ( Server Explorer and Toolbox ) as tabs
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Overview of the Visual Studio.NET IDE Figure 2.5 Web site ( ) being entered in the location bar. Start Page Start Page Links Page loaded when Get Started is clicked
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Overview of the Visual Studio.NET IDE Entering an address in the location bar –Brings you to specified Web site
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Overview of the Visual Studio.NET IDE Figure 2.6 DEITEL™ home page displayed in the Visual Studio.NET IDE. (Courtesy of Deitel & Associates, Inc.) Navigation Button sEntering in the location bar
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Creating a Project for the Welcome Application Figure 2.7 Solutions can contain one or more projects. Applications –Contain one solution –Solutions contain one or more projects
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Creating a Project for the Welcome Application Figure 2.8 New Project Button. New Project Button
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Creating a Project for the Welcome Application Figure 2.9 New Project dialog. Title bar (displaying New Project ) Projects Types : pane Templates: paneC# Windows Application (selected) Description of project selected in Templates: pane Default project and solution name Location of new project Visual C# Projects folder (selected)
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Creating a Project for the Welcome Application Clicking the New Project Button –Displays New Project dialog Choose type of project to create Choose project template Specify name of project Browse Button –Specify location of project
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Creating a Project for the Welcome Application Figure 2.10 New Project dialog with updated project information. Updated project and solution name Browse… Button Updated project location
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Creating a Project for the Welcome Application Figure 2.11 Project Location dialog. Open Button SimplyCSP directory (selected)
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Creating a Project for the Welcome Application Project Location dialog –Allows you to specify location of project –Select SimplyCSP
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Creating a Project for the Welcome Application Visual Studio.NET –Tabs provide easy access to multiple files –Active tab displayed in bold –Menu bar contains menus that contain commands –Solution Explorer lists all files in solution –Form1 represents new Windows application GUI –Properties window lists properties of Form and controls.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Creating a Project for the Welcome Application Figure 2.12 Design view of Visual Studio.NET. Tabs Active tab Form (Windows application) titled Form1 Menu bar Solution Explorer Properties window
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Creating a Project for the Welcome Application Internet Explorer GUI –Menu bar contains six menu items –Toolbar contains Button s that execute tasks –Users type Web site address in ComboBox Drop-down arrow allows user to select previously visited page Label identifies ComboBox ’s purpose –Web page’s TextBox allows user to input data
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Creating a Project for the Welcome Application Figure 2.13 Internet Explorer window with GUI controls labeled. (Web site content courtesy of Deitel & Associates, Inc.) Title bar Menu bar Menu ( Help ) Button (displaying an icon) ComboBox Drop-down arrow Web site requested by user TextBox Toolbar Label
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Menu Bar and Toolbar Figure 2.14 Visual Studio.NET IDE menu bar. Visual Studio.NET menu bar –Contains commands for: Managing the IDE Developing applications Executing applications –Each menu has menu items that perform certain actions
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Menu Bar and Toolbar
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Menu Bar and Toolbar Figure 2.16 IDE toolbar. Toolbar –Contains icons that represent commonly used commands –Down arrow indicates additional commands ToolbarToolbar icon indicates a command to open a project or solution Down arrow indicates additional commands are available
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 28 Tool tip –Appears when mouse pointer held over icon –Displays description of icon 2.4 Menu Bar and Toolbar Figure 2.17 Tool-tip demonstration. Tool tip displayed when the mouse pointer has rested on the icon for a few seconds
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Visual Studio.NET IDE Windows Figure 2.18 Toolbar icons for three Visual Studio.NET IDE windows. Toolbar icons –Contains commands for opening: –Solution Explorer window –Properties window –Object Browser window –Class View window –Toolbox Solution Explorer iconProperties iconClass View icon Object Browser icon Toolbox icon
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Visual Studio.NET IDE Windows Figure 2.19 Solution Explorer with an open solution. Solution Explorer –Provides access to all files in solution –Nodes allow groups to be expanded and collapsed Collapsed node (Plus box expands when clicked) Toolbar Expanded node (Minus box collapses when clicked Form file Properties window icon Project name
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Visual Studio.NET IDE Windows Figure 2.20 Expanded node. Expanded node (minus box)Project name (selected) Solution Explorer –Minus box represents expanded node
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Visual Studio.NET IDE Windows Figure 2.21 Collapsed node. Collapsed node (plus box)Solution name Solution Explorer –Plus box represents collapsed node
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Visual Studio.NET IDE Windows Toolbox –Displayed by selecting View > Toolbox –Contains five tabs, each grouping related controls: Data Components Windows Forms Clipboard Ring General –Selecting tab displays controls in that group –Black scroll arrows used to display additional controls If scroll arrow is gray, it is disabled, no more controls to choose from
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Visual Studio.NET IDE Windows Scroll arrow (disabled) Tabs Controls TabsScroll arrow (enabled) Additional Windows Forms tab controls (displayed after the down-scroll key has been clicked several times Figure 2.22 Toolbox displaying the contents of the Windows Forms tab.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Visual Studio.NET IDE Windows Properties window –Displayed by selecting View > Properties Window –Allows quick setting of a control’s properties –Displays brief description of property –Do not have to remember a properties settings –Each Form or control has its own properties –Component object box: Allows you to select control to change properties Displays control’s name and class
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Visual Studio.NET IDE Windows Figure 2.23 Properties window displaying a Form ’s properties. Component object box Toolbar Alphabetic icon Categorized icon Selected property Design iconDescription of selected property Properties (left column) Property values (right column) Scrollbox Scrollbar Object ’ s name ( Form1 ) Down arrow for selecting Form or control objects Object ’ s class (System.Windows.Forms.Form)
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Auto Hide Figure 2.24 Hidden-window tabs. Toolbar –Toolbar contains tabs that represent hidden windows When tabs selected, hidden window appears Window closes when mouse moves out of windows area Tabs for hidden windows
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Auto Hide Auto Hide –Space saving feature –When pin icon is vertical, Auto Hide is disabled Window stays open
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Auto Hide Title bar Figure 2.25 Displaying a hidden window with Auto Hide enabled. 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
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Auto Hide Auto hide enabled –Horizontal pin icon –Toolbox is displayed when mouse pointer is placed on the tab
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Auto Hide Mouse pointer outside the tab for the Toolbox ( Toolbox windows is hidden) Figure 2.26 Hiding the Toolbox by moving the mouse pointer outside of Toolbox’s area.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Auto Hide Figure 2.27 Pin icon in vertical position. Vertical pin icon Vertical pin icon (Auto Hide is disabled)
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Using Help
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Using Help Dynamic Help –Articles that apply to current content –Toolbar Toolbar provides access to –Contents –Index –Search
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Using Help Figure 2.29 Dynamic Help window. Selected item Dynamic Help windowToolbar Search Index Relevant help article links Contents
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Saving and Closing Solutions in Visual Studio.NET Saving the project –Select File > Save All Closing the solution –Select File > Close Solution Closing the IDE –Click Visual Studio.NET’s close box