Slide 1 VB Default Controls Text Box, Check Box, Option Button & Frames.

Slides:



Advertisements
Similar presentations
CS0004: Introduction to Programming Select Case Statements and Selection Input.
Advertisements

Working with Intrinsic Controls and ActiveX Controls
Information System Design Lab 5&6. User Interface Design.
COMPREHENSIVE Word Tutorial 9 Creating On-Screen Forms Using Advanced Table Techniques.
Automating Tasks With Macros
Creating Custom Forms. 2 Design and create a custom form You can create a custom form by modifying an existing form or creating a new form. Either way,
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 7- 1.
Flowchart Start Input weight and height
VB Default Controls List Box, Combo Box
Exploring the Basics of Windows XP. Objectives Start Windows XP and tour the desktop Explore the Start menu Run software programs, switch between them,
Controls General Discussion. VB Controls Visual Basic Controls A control is the generic name for any object placed on a form Controls may be images,
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
Ch 11: Userforms CP212 Winter Topics Designing User Forms o Controls Setting Properties o Tab Order o Testing Writing Event Handlers o Userform_Initialize.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Introduction to Programming Using Visual Basic 6.0
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Multiple Forms, Container Controls, AddHandler This presentation is based on the Forms and ContainerControls VB Projects 1.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
Microsoft Word 2000 Presentation 5. Major Word Topics Columns Tables Lists.
Chapter 5 Menus, Common Dialog Boxes, and Methods Programming in C#.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
A First Look At Microsoft Visual Basic Lesson 1. What is Microsoft Visual Basic? Microsoft Visual Basic is a software development tool, which means it.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
XP New Perspectives on Windows XP Tutorial 1 Exploring the Basics.
Copyright © 2001 by Wiley. All rights reserved. Chapter 2: Using Visual Basic to Create a First Project Getting Started with VB Development Environment.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Chapter 9 - VB.Net by Schneider1 Chapter 9 – Additional Controls and Objects 9.1 List Boxes, Combo Boxes, and the File-Opening Control The List Box Control.
1 Flow Control II Code: Select-Case and For-Next Controls: Frames and OptionButtons.
Chapter Two Creating a First Project in Visual Basic.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Visual Basic Programming Introduction VB is one of the High level language VB has evolved from the BASIC language. BASIC stands for Beginners All-purpose.
CS 101 Test 2 Study Guide Acronyms RAD - Rapid Application Development IDE - Integrated Development Environment GUI - Graphical User Interface VB - Visual.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
More Form Tools Combo Box (displays a list) Check Box (yes/no) Frame (groups option buttons) Option Button (exclusive choice) Ref Edit (user selects cells)
Slide 1 Using Menu Bar & Common Dialog Boxes. Slide 2 Setting Up the Main Items v First open the form on which you want the menu located v Then start.
1 Fields Sacramento City College Engineering Design Technology.
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
Pay Example (PFirst98) Please use speaker notes for additional information!
1 Chapter 4 – Decisions 4.1 Relational and Logical Operators (see other set of slides) 4.2 If Blocks (see other set of slides) 4.3 Select Case Blocks (see.
31/01/ Selection If selection construct.
Creating Menus Menu Bar – behaves like standard Windows menus Can be used in place of or in addition to buttons to execute a procedure Menu items are controls.
VB 4 Controls Scrollbar Radio button check box listboxes timers control arrays.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Introduction to Programming Using Visual Basic 6.0 Cheryl Klimack
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 6 1 Microsoft Office Access 2003 Tutorial 6 – Creating Custom Forms.
Copyright © Don Kussee 1410-Ch5 #1031 CNS 1120 Chapter 5 Selection statements 1120-Ch5.PPT.
Basic GUI VISUAL BASIC. BASIC GUI Slide 2 of 53 Topic & Structure of the lesson Introduction Data Validation Use controls for making choices Write Pull.
TOOLBOX. The Toolbox Intrinsic Controls - always included in the Toolbox ActiveX Controls - separate files with ocx file extension Insertable Objects.
Controls for Choices. Let’s look at a couple of new controls: option buttons and check boxes These controls are designed to be used when you want the.
Knowledge Base. Defining a Variable Dim statement Dim intXX As Integer Public in a Module Public dblNN As Double.
MsgBox, Input Box Functions Check boxes, radio button MsgBox, Input Box Functions Lab 3 3 Ismail M. Romi: PPU- IT Dept.
Visual Basic.NET BASICS Lesson 14 Menus and Printing.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Chapter 7 Multiple Forms, Modules, and Menus. Section 7.2 MODULES A module contains code—declarations and procedures—that are used by other files in a.
COMPUTER PROGRAMMING I Apply Procedures to Develop List Box and Combo Box Objects.
1 Visual Basic: An Object Oriented Approach 7 – The User interface.
3.02 APPLY PROPERTIES ASSOCIATED WITH THE CONTROLS Computer Programming I.
Chapter Topics 15.1 Graphical User Interfaces
Chapter 8: Writing Graphical User Interfaces
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
Standard Controls.
The Check Box Control Consists of a small square and a caption
Chapter 15: GUI Applications & Event-Driven Programming
Group Boxes, Radio buttons and Checked List Boxes
Presentation transcript:

Slide 1 VB Default Controls Text Box, Check Box, Option Button & Frames

Slide 2 Default Controls

Slide 3 Control Function

Slide 4 Control Function

Slide 5 Other Controls v The controls shown are not the only ones included with VB. To add other controls such as the Microsoft CommonDialog control or Microsoft FlexGrid control : –use the Components dialog box by choosing Project, Components, or right-clicking an empty area of the Toolbox and selecting Components from the context menu.

Slide 6 Text Box v The AutoSize Property v The WordWrap Property v New Line: (vbCrLf) –Label1.caption = “First Line” & vbCrLf & “Second Line”

Slide 7 Text Box v Handling Multiple Lines of Text by MultiLine and ScrollBar properties.

Slide 8 Controls for Making Choices v Check Box: Switches one or more options on or off v Option Button: Selects a single choice from a group v List Box: Displays a list of user-defined items v Combo Box: Like a list box, but also displays selected item

Slide 9 Check Boxes If chkBan = 1 Then lblChoice.Caption = "Bannana“ End If If chkTom = 1 Then lblChoice.Caption = "Tomato" End If

Slide 10 Check Boxes v Style Property –0 – Standard, 1 – Graphical v Picture Property –set the picture when not checked v DownPicture –set picture when checked v DisabledPicture –set picture when disabled or grayed

Slide 11 Option Buttons v also called radio buttons, v they exist in a group, only one of them can be “selected” at a time. v To use them: –Draw a group of option buttons –You can give each of them a different name –OR you can give them the same name (VB will ask u if you want to create a control array: answer “Yes”)

Slide 12 Option Buttons v It can be used in programming in two ways: –1. Use the Click event if you want to take an action when users select an option. (Control Array) – Happens Immediately Private Sub optWash_Click(Index As Integer) Select Case Index Case 0 MsgBox “You selected: Normal” Case 1 MsgBox “You selected: Heavy Duty” Case 2 MsgBox “You selected: Pots and Pans” End Select End Sub

Slide 13 Option Buttons –2. use an if statement to check their state (no control array) – Do not Happen Immediately : Private Sub cmdStartWash_Click() If optNormal = True Then MsgBox “You selected: Normal” Elseif optHeavy = True Then MsgBox “You selected: Heavy Duty” Else MsgBox “You selected: Pots and Pans” End If End Sub

Slide 14 Option Buttons v To have multiple option buttons on a form selected at the same time: separate the option buttons into groups by using container controls (frame).

Slide 15 Frames v A type of control called a container. v Containers are controls in which you can draw other controls. v After you draw a Frame control, you are ready to start placing other controls in it. You can place any controls you like in the frame (or any other container). You can even place containers within containers. v The only way to move a control from other parts of the form into the frame is to cut and paste