Chapter 31 Visual Basic Controls A Form is a windows-style screen displayed by Visual Basic programs. In a form, a programmer can create objects in a form.

Slides:



Advertisements
Similar presentations
Chapter 2 –Visual Basic, Controls, and Events
Advertisements

CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Chapter 1: An Introduction to Visual Basic 2012
Using Macros and Visual Basic for Applications (VBA) with Excel
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
© 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 …
Chapter 2 –Visual Basic, Controls, and Events
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Chapter 2 –Visual Basic, Controls, and Events
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
Chapter 3 Introduction to Event Handling and Windows Forms Applications.
Microsoft Visual Basic 2012 CHAPTER TWO Program and Graphical User Interface Design.
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.
R EVIEW OF C HAPTER 1 1. Trouble installing/accessing Visual Studio? 2.
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.
Chapter 3: Using GUI Objects and the Visual Studio IDE.
Chapter 3 – Fundamentals of Programming in VB.NET VB.NET Controls VB.NET Events Numbers Strings Input and Output.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
Introduction to Visual Basic.NET Chapter 2 Introduction to Controls, Events.
Basic Controls & Properties Chapter 2. Overview u VB-IDE u Basic Controls  Command Button  Label  Text Box  Picture Box u Program Editor  Setting.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Introduction to Visual Basic.NET Your First Visual Basic.NET Application.
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
Chapter 2 –Visual Basic, Controls, and Events
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
Chapter Two Designing Applications Programming with Microsoft Visual Basic th Edition.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
Chapter 2 - VB 2008 by Schneider1 Chapter 2 –Visual Basic, Controls, and Events 2.1 An Introduction to Visual Basic 2.2 Visual Basic Controls 2.3 Visual.
Chapter 2 – Introduction to the Visual Studio .NET IDE
CSC 230 (Blum)1 Visual Basic 2005 Hello World Fall 2005 T. Blum.
Chapter 3 - VB.NET by Schneider1 Chapter 3 – Fundamentals of Programming in VB.NET Part I VB.NET Controls VB.NET Events.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
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.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
CSC 230 (Blum)1 Visual Basic 2005 Hello World Fall 2005 T. Blum.
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.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Chapter 2 - VB 2008 by Schneider1 Chapter 2 –Visual Basic, Controls, and Events 2.1 An Introduction to Visual Basic 2.2 Visual Basic Controls 2.3 Visual.
 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.
Programming with Microsoft Visual Basic 2012 Chapter 1: An Introduction to Visual Basic 2012.
ALMAJMA'AH UNIVERSITY College of Science and Humanitarians Studies in Alghat Information Technology Section (211Tal course) 1.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 11 Creating Web Applications and Writing Data to a Database.
Chapter 1: An Introduction to Visual Basic .NET
Visual Basic .NET BASICS
Microsoft Visual Basic 2005 BASICS
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
Program and Graphical User Interface Design
How to design a Windows Forms application
3.01 Apply Controls Associated With Visual Studio Form
Introduction to the Visual C# 2005 Express Edition IDE
Chapter 3 Fundamentals of Programming in Visual Basic 3
Program and Graphical User Interface Design
Chapter 2 – Introduction to the Visual Studio .NET IDE
Presentation transcript:

Chapter 31 Visual Basic Controls A Form is a windows-style screen displayed by Visual Basic programs. In a form, a programmer can create objects in a form to display and/or retrieve information. Visual Basic controls are objects created in a form to display and/or retrieve information.

Chapter 32 Visual Basic Controls Controls examples Text Box Control, Button Control, Label Control Each control has many properties and is associated with methods and events. For example, name and fonts are properties

Chapter 33 Visual Basic Start Page

Chapter 34 Start a New Project Projects Projects are Visual Basic programs. They are also known as applications, or solutions.

Chapter 35 New Project Dialog Box A project is used to create an application with a windows user interface

Chapter 36 Solution vs Projects A project includes a set of source files, plus related metadata such as component references and build instructions. Projects generally produce one or more output files when built. references A solution includes one or more projects, plus files and metadata that help define the solution as a whole:

Chapter 37 Initial Visual Basic Screen

Chapter 38 Toolbox The toolbox holds icons representing controls that can be placed on the form.

Chapter 39 3 Ways to Place a Control from the Toolbox onto the Form Window Double-click Drag Click, Point, and Drag

Chapter 310 Lab Refers to the examples in the Lab

Chapter 311 Four Controls at Design Time Text box To select a control, click on it. Sizing handles will appear when a control is selected.

Chapter 312 Text Box Control Used for input and output When used for output, ReadOnly property is set to True Sizing handles Tasks button

Chapter 313 Properties Window Categorized view Alphabetical view Press F4 to display the Properties window for the selected control.

Chapter 314 Properties Window Properties Settings Selected control

Chapter 315 Some Often Used Properties Text Autosize Font.Name Font.Size ForeColor BackColor ReadOnly

Chapter 316 Setting Properties Click on property name in left column. Enter its setting into right column by typing or selecting from options displayed via a button or ellipses.

Chapter 317 Setting the ForeColor Property 1.Click on ForeColor. 2.Click on button at right of settings box. 3.Click on Custom tab to obtain display shown. 4.Click on a color.

Chapter 318 Font Property 1.Click on Font in left column. 2.Click on ellipsis at right of settings box to obtain display shown, 3.Make selections.

Chapter 319 Button Control The caption on the button should indicate the effect of clicking on the button. Text property determines caption.

Chapter 320 Add an "access key"

Chapter 321 Label Control Used to identify the contents of a text box. Text property specifies caption. By default, label automatically resizes to accommodate caption on one line. When the AutoSize property is set to False, label can be resized manually. Used primarily to obtain a multi-rowed label.

Chapter 322 List Box Control Initially used to display several pieces of output. Later used to select from a list.

Chapter 323 The Name Property How the programmer refers to a control in code Setting for Name property near top of Properties window. Name must begin with a letter, be less than 215 characters long, and may include numbers and letters. Use appropriate 3- or 4-character naming prefix

Chapter 324 Control Name Prefixes ControlPrefixExample buttonbtnbtnCompute labellbllblAddress text boxtxttxtAddress list boxlstlstOutput

Chapter 325 Renaming the Form Initial name is Form1 The Solution Explorer window lists a file named Form1.vb. To rename the form, change the name of this file to newName.vb newName should begin with prefix frm.

Chapter 326 Fonts Proportional width fonts take up less space for "I" than for "W" – like Microsoft Sans Serif Fixed-width fonts take up the same amount of space for each character – like Courier New Fixed-width fonts are good for tables.

Chapter 327 Auto Hide Hides Toolbox when not in use Vertical push pin icon indicates auto hide is disabled. Click the push pin to make it horizontal and enable auto hide. Push pin

Chapter 328 Positioning Controls Proximity line

Chapter 329 Aligning Controls Snap line

Chapter 330 Aligning Controls Snap line