© Copyright 1992-2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 3.1 Test-Driving the Welcome Application 3.2.

Slides:



Advertisements
Similar presentations
Chapter 3 – Web Design Tables & Page Layout
Advertisements

Step-by-Step: Add a Graphical Hyperlink USE the Special Events Final presentation that is still open from the previous exercise. 1.Go to slide 4, and click.
Using Macros and Visual Basic for Applications (VBA) with Excel
© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
© by Pearson Education, Inc. All Rights Reserved. continued …
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
 2002 Prentice Hall. All rights reserved. Chapter 2 - Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Overview of the Visual Studio.NET.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 9 1 Microsoft Office FrontPage 2003 Tutorial 9 – Using Layout Tables, Styles, and Office.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Microsoft Visual Basic 2012 CHAPTER TEN Incorporating Databases with ADO.NET.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Chapter 5 Using Business Information Sets
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
®® Microsoft Windows 7 for Power Users Tutorial 2p2 Customizing Microsoft Windows 7.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 2 - Welcome Application: Introduction to C++
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introducing Web Controls Outline 29.1 Analyzing the.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 4 1 Microsoft Office FrontPage 2003 Tutorial 4 – Using Shared Borders and Themes.
IE 411/511: Visual Programming for Industrial Applications
Chapter 1: An Introduction to Visual Basic 2005 Programming with Microsoft Visual Basic 2005, Third Edition.
 Computer use is increasing in almost every field  Computing costs have been decreasing dramatically due to rapid developments in hardware, software.
Chapter 14. Copyright 2003, Paradigm Publishing Inc. CHAPTER 14 BACKNEXTEND 14-2 LINKS TO OBJECTIVES Add Borders with Borders Button Add Borders with.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 2 Welcome Application Introducing the Visual Basic 2008 Express Edition IDE.
Microsoft Expression Web-Illustrated Unit I: Working with Tables.
 2009 Pearson Education, Inc. All rights reserved Introduction to the Visual Basic Express 2008 IDE.
 2009 Pearson Education, Inc. All rights reserved Dive Into ® Visual C# 2008 Express.
Jozef Goetz,  2006 Pearson Education, Inc. All rights reserved.  2002 Prentice Hall. All rights reserved. expanded by J. Goetz, 2009.
Copyright © 2001 by Wiley. All rights reserved. Chapter 2: Using Visual Basic to Create a First Project Getting Started with VB Development Environment.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 13 – Graphical User Interfaces Part 2 Outline.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Pasewark & Pasewark 1 Access Lesson 5 Creating and Modifying Reports Microsoft Office 2007: Introductory.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
Chapter 2 – Introduction to the Visual Studio .NET IDE
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft PowerPoint 2002 Lesson 4 Strengthening.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 2.1 Test-Driving the Welcome Application 2.2.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 25.1 Test-Driving the ATM Application 25.2.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 5.1 Test-Driving the Inventory Application.
Pasewark & Pasewark 1 Access Lesson 5 Creating and Modifying Reports Microsoft Office 2007: Introductory.
By: Ms. Abeer Helwa 1. CREATE A WORD DOCUMENT 2 Blank document Templates To create a new blank document: click the File tab and click Blank document.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 2 – Welcome Application Introduction to Graphical.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 4 Designing the Inventory Application Introducing TextBox es and Button s.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
Addison Wesley is an imprint of © 2011 Pearson Addison-Wesley. All rights reserved. Chapter 2 Creating Applications with Visual Basic.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
 2009 Pearson Education, Inc. All rights reserved. 1 CS1120 Introduction to Windows Forms Applications Many slides modified by Prof. L. Lilien (even many.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
 2007 Pearson Education, Inc. All rights reserved Introduction to the Visual Basic Express 2005 IDE.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
 You won’t write a single line of program code.  Instead, you’ll use visual programming techniques.  Visual Studio processes your actions (such as mouse.
2-1 Chapter 2 Using VB.NET to Create a First Solution.
Lesson 13 Tables. Overview Create a table. Key and edit text in tables. Select cells, rows, and columns. Edit table structures. Format tables and cell.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 5 1 Microsoft Office FrontPage 2003 Tutorial 5 – Creating Tables and Frames.
Dive Into® Visual Basic 2010 Express
Chapter 1: An Introduction to Visual Basic .NET
Chapter 1: An Introduction to Visual Basic 2015
Chapter 2 – Introduction to the Visual Studio .NET IDE
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
Introduction to the Visual C# 2005 Express Edition IDE
Chapter 2 – Introduction to the Visual Studio .NET IDE
Presentation transcript:

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 3.1 Test-Driving the Welcome Application 3.2 Constructing the Welcome Application 3.3 Objects used in the Welcome Application 3.4 Wrap-Up Tutorial 3 - Welcome Application Introduction to Visual Programming

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 2 Objectives In this tutorial, you will learn to: –Set the text in the Form ’s title bar. –Change the Form ’s background color. –Place a Label control on the Form. –Display text in a Label control. –Place a PictureBox control on the Form. –Display an image in a PictureBox control. –Run an application.

© 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 Figure 3.1 Opening an existing solution with the File menu’s Open Solution … Command. Open Solution command (selected) opens an existing solution Select File > Open Solution... to display the Open Solution dialog

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test-Driving the Welcome Application Look in: ComboBox –Select Welcome directory Select the Welcome solution file and click the Open button

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test-Driving the Welcome Application Figure 3.2 Open Solution dialog displaying the contents of the Welcome solution. Look in: ComboBox Welcome.sln solution file (may display Welcome depending on your settings) Open Solution dialog

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test-Driving the Welcome Application Visual Studio.NET IDE –Presents Welcome.cs in design view

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test-Driving the Welcome Application Figure 3.3 Welcome application’s Form in design view. Double click to open the Form in design view

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test-Driving the Welcome Application Figure 3.4 Running the Welcome application using the Debug menu’s Start command. Select Debug > Start The Start command runs (executes) the application. Start command (selected) runs the application

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test-Driving the Welcome Application Application during Run mode –Notice the application’s output Closing the running application –Click the application’s close box

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test-Driving the Welcome Application Figure 3.5 Welcome application running. Close box

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Select File > Open Solution.... –Open the Welcome solution file ( Welcome.sln ) Viewing the IDE in design mode –The empty Form –The Solution Explorer window –Toolbar –IDE title bar

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Figure 3.6 Blank Form. Toolbar Form title bar Form file name IDE title bar Solution Explorer window Solution nameProject nameBlank Form

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Changing the Form ’s file name –Locate the Solution Explorer –Select the file –Change the File Name property

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Figure 3.7 Changing the Form ’s file name. File properties New file name New property value Selected property description Selected property

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Changing the Form ’s title display –Locate Solution Explorer –Select the Text property –Change the text Figure 3.8 Setting the Form ’s Text property. Selected property description Selected propertyProperty value

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Title bar changes to display Form ’s Text property Figure 3.9 Title bar for the Welcome application. Title bar

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Examine the empty Form –Grid layout –Enabled sizing handle –Height and width

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Figure 3.10 Form with sizing handles. Grid Height Disabled sizing handleMouse pointer over an enabled sizing handle Enabled sizing handleWidth

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Resizing the Form –Expand the Size property –Change the Width –Change the Height Figure 3.11 Size property values for the Form. Size property values

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Changing the Form ’s background color –Locate the BackColor property System tab (default) Web tab Custom tab

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Figure 3.12 Viewing the Custom palette in the Form ’s BackColor property value field. Tabs Custom colors can be added to the white boxes Custom paletteDown-arrow Button Current color

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Custom tab palette –Define Color dialog Create your own colors RGB values

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Figure 3.13 Adding a color to the Custom palette. Blue component ( 169 )Green component ( 237 )Color previewRed component ( 255 )Adds a color to Custom palette

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Result of background color change –New RGB color values

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Figure 3.14 Properties window after the new custom color has been added. Form background set to new custom color Custom color added to palette

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Toolbox –Windows Forms tab Figure 3.15 Clicking the Windows Forms tab in the Toolbox. Windows Forms tab Label control

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Label added to Form Figure 3.16 Adding a Label to the Form. New background colorSizing handle (enabled) Label control

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Adding text to the Label –Label ’s content changes to reflect new Text value Figure 3.17 Label after updating its Text property. Updated Text property value too large for Label

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Resizing the Label –Text re-aligns to fit new Label size Figure 3.18 Label after it has been resized. Label resized vertically and horizontally

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Moving the Label on the Form Figure 3.19 Centered Label. Centered Label

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Changing the font –Locate Solution Explorer –Select the Label –Select Font property Figure 3.20 Properties window displaying the Label ’s properties. Ellipsis Button

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Font dialog –Change text by changing values in dialogs

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Figure 3.21 Font dialog for selecting fonts, styles and sizes. Current font Font dialogFont sample

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Text alignment –Access TextAlign property –Select appropriate option

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Figure 3.22 Centering the Label ’s text. Top-center alignment option Text alignment options

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Inserting a picture –Select the PictureBox control Drop control onto Form

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Figure 3.23 Inserting and aligning the PictureBox. Updated Label PictureBox

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Changing PictureBox properties –Locate Solution Explorer –Locate Image property Figure 3.24 Image property of the PictureBox. Image property value (no image selected) Ellipsis Button Image preview box (no image currently displayed)

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Selecting the picture –Navigate the Open dialog to the picture location –Click Open

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Figure 3.25 Open dialog used to browse for a PictureBox image. bug.png file (may display bug depending on your settings)

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Resizing the image –Change property SizeMode StretchImage scales image in PictureBox –Change property Size Figure 3.26 Newly inserted image. PictureBox too small for image

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Previewed image in Image property Figure 3.27 Image previewed in the Image property value field. Previewed image

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Align the image –Format > Center in Form > Horizontally

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Figure 3.28 PictureBox displaying an image. Newly inserted image

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Locking the controls –Disallow accidental resizing and relocation of controls Figure 3.29 Locking controls by using the Format menu. Lock Controls option

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Running the application –Title bar indicates the current application mode –Debug > Start Closing the running application –Click the application’s close box

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Constructing the Welcome Application Figure 3.30 IDE in run mode, with the application running in the foreground. IDE title bar displaying [run] Form (with grid) Running application

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Objects used in the Welcome Application ComboBox –Located at top of Properties window –Displays the names and class types of Form and control objects Figure 3.31 Component object box expanded to show the Welcome application’s objects. Welcome application GUI objects

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Objects used in the Welcome Application Namespaces –Organizes classes by functionality –Directory-like entities –System.Windows.Forms Figure 3.32 The name and class type of an object are displayed in the Properties window’s component object box. Name of object ( Form1 ) Namespace ( System.Windows.Forms ) Class type of object ( Form )