Welcome with Ifs CSC 230 (Blum).

Slides:



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

Information System Design Lab 5&6. User Interface Design.
CS 178: Programming with Multimedia Objects Aditya P. Mathur Professor of Computer Sciences Purdue University, West Lafayette Sept 9, 2004 Last update:
ListBoxes The list box control allows the user to view and select from multiple items in a list. CheckedListBox control extends a list box by including.
Group Boxes and Panels Arrange components on a GUI Buttons and etc. can be placed inside a group box or panel. All these buttons move together when the.
List-based Controls. Slide 2 Introduction There are several controls that work with lists ComboBox ListBox CheckedListBox.
Introduction to Visual Basic Chulantha Kulasekere.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
05/09/ Introducing Visual Basic Sequence Programming.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Six Repeating Program Instructions.
InvEasy (Project1) Please use speaker notes for additional information!
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 1B Introduction (Tutorial)
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.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter Six The Do Loop and List Boxes.
Class 3 Remote Instruction Computer Math EDU 556 Programming for Instruction Dr. Steve Broskoske This is an audio PowerCast. Make sure your volume is.
What is Visual Basic.NET? 110 B-1 e.g. a word processor doesn’t do anything until the user clicks on a button, types text... A programming language that.
Vocabulary in VB So Far. Assignment: Used to change the value of an object at run time Used to change the value of an object at run time.
CSC 230 (Blum)1 Visual Basic 2005 Hello World Fall 2005 T. Blum.
CSC 157 (Blum)1 Hello World. CSC 157 (Blum)2 Start/Programs/Microsoft Visual Studio.NET 2003/Microsoft Visual Studio.NET 2003.
CSC 240 (Blum)1 Introduction to Access CSC 240 (Blum)2 Click on the Access desktop icon or go to Start/Programs/Microsoft Office/Microsoft Office.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 25.1 Test-Driving the ATM Application 25.2.
Select (drop-down list) Inputs. Insert/Form/List Menu.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
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.
Double click here to add event title Double click here to add event date Double click here to add event time Double click here to add event location.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 13 How Long Can This Go On?
Controlling Program Flow with Looping Structures
KEYWORD SEARCH. Click here to begin KEYWORD SEARCH.
CSC 230 (Blum)1 Visual Basic 2005 Hello World Fall 2005 T. Blum.
CSD 340 (Blum)1 Introducing Text Input elements and Ifs.
CSC 230 (Blum)1 Getting a List of Colors. CSC 230 (Blum)2 Imagine a program in which you want a list of colors in a ComboBox.
Beginning ASP.NET in C# and VB Chapter 9
Programming with Visual Basic.NET. Quick Links Program Code The Code Window The Event Procedure Assignment Statements Using AutoList Radio Buttons Buttons.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 6 Looping and Multiple Forms.
Chapter 6 Controlling Program Flow with Looping Structures.
COMPUTER PROGRAMMING I Apply Procedures to Develop List Box and Combo Box Objects.
Client-side (JavaScript) Validation. Associating a function with a click event – Part 1 Use the input tag’s onclick attribute to associate a function.
3.02 APPLY PROPERTIES ASSOCIATED WITH THE CONTROLS Computer Programming I.
Visual Basic Fundamental Concepts
Visual Studio 2010 Hello World CSC 230.
Apply Procedures to Develop Menus, List Box and Combo Box Objects
Computing with C# and the .NET Framework
Lexical Reference Variables in Graphics and List Box in Forms
Using Procedures and Exception Handling
Apply Procedures to Develop Menus, List Box and Combo Box Objects
Repeating Program Instructions
Objectives Learn about Function procedures (functions), Sub procedures (subroutines), and modules Review and modify an existing subroutine in an event.
Visual Studio 2010 Hello World CSC 230.
Visual Basic..
Introduction to Access 2003
Lesson 8: Boolean Expressions and "if" Statements
Microsoft Visual Basic 2005: Reloaded Second Edition
The List Box Control Items can be placed into the list at design time or run time The Sorted property causes items in the list to be sorted automatically.
CIS 16 Application Development Programming with Visual Basic
CS288 Lab Exercise 2.
Fonts, TabControl, ListBox
Additional Topics in VB.NET
Module 8: Creating Windows-based Applications
Visual C# - GUI and controls - 1
YOUR text YOUR text YOUR text YOUR text
CHAPTER FOUR VARIABLES AND CONSTANTS
Custom Forms with VBA in Excel In-Class Exercise #11
Tutorial 11 Using and Writing Visual Basic for Applications Code
Presentation transcript:

Welcome with Ifs CSC 230 (Blum)

Add a ComboBox and give it a name (e.g. cboLanguauge) CSC 230 (Blum)

Click next to the Items property and then the ellipsis button that results. CSC 230 (Blum)

Use the String Collection Editor dialog box to enter the language names. CSC 230 (Blum)

Result so far CSC 230 (Blum)

Set the Text property to “English” (the ComboBox will now start with an entry) CSC 230 (Blum)

Add a button (btnOK) and label (lblMessage) CSC 230 (Blum)

btnOK_Click subroutine uses If to establish different behavior in different cases CSC 230 (Blum)

Structure of an If If cboLanguage.Text = "English" Then lblMessage.Text = "Welcome" End If If, Then and End are keywords the establish the structure of the If statement Between If and Then comes a condition – an expression that evaluates to True or False Between the line starting with If and the End If line comes a statement or set of statements to be executed provided the condition is true and is ignored should the condition be false CSC 230 (Blum)

Result User forgot to click OK button CSC 230 (Blum)

Return to Design view and double click on the ComboBox The ComboBox has a SelectedIndexChanged event and we will put our code here and eliminate the button altogether CSC 230 (Blum)

New buttonless design CSC 230 (Blum)

New buttonless code CSC 230 (Blum)

Result: Somewhat improved with no button for user to forget to click CSC 230 (Blum)