Compunet Corporation Programming with Visual Basic.NET GUI Chapter 3 Week 13 Tariq Aziz and Kevin Jones.

Slides:



Advertisements
Similar presentations
GUI Testing. High level System Testing Test only those scenarios and outputs that are observable by the user Event-driven Interactive Two parts to test.
Advertisements

Microsoft Visual Basic: Reloaded Chapter Five More on the Selection Structure.
C# Programming: From Problem Analysis to Program Design1 9 Programming Based on Events.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 1 Tariq Aziz and Kevin Jones.
Compunet Corporation Programming with Visual Studio.NET GUI Week 13 Tariq Aziz and Kevin Jones.
Programming Based on Events
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 3-1 of…
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 2 Tariq Aziz and Kevin Jones.
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.
Compunet Corporation Programming with Visual Basic.NET GUI Week # 11 Tariq Ibn Aziz.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 3 Tariq Aziz and Kevin Jones.
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.
Visual Basic Chapter 1 Mr. Wangler.
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Lab 9 – User Forms Design. User Forms What are user forms? –Known as dialog boxes –Major ways for getting user input An example of using user forms: Monthly.
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.
1- Date TimePicker 2- Month Calendar 3- User Defined Controls.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
1 Graphical User Interfaces Part 2 Outline ListBoxes and CheckedListBoxes ListBoxes CheckedListBoxes ComboBoxes.
Chapter 12: Using Controls. Examining the IDE’s Automatically Generated Code A new Windows Forms project has been started and given the name FormWithALabelAndAButton.
110 M - 1 ListBoxes & ComboBoxes Provide a list for the user to select from Various styles, choose based on –Amount of data to be displayed –Space available.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
GUI development with Matlab: GUI Front Panel Components 1 GUI front panel components In this section, we will look at -GUI front panel components -Programming.
ListBox, ComboBox, Menu Chapter 5.4, ComboBox Control: Properties & Methods u Combines TextBox features with a short drop- down list  cboOne.AddItem(string)
Graphical User Interface Concepts - Part 2 Session 09 Mata kuliah: M0874 – Programming II Tahun: 2010.
Graphical User Interfaces Tonga Institute of Higher Education.
Class 3 Remote Instruction Computer Math EDU 556 Programming for Instruction Dr. Steve Broskoske This is an audio PowerCast. Make sure your volume is.
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.
CS 101 Test 2 Study Guide Acronyms RAD - Rapid Application Development IDE - Integrated Development Environment GUI - Graphical User Interface VB - Visual.
Object-Oriented Application Development Using VB.NET 1 Chapter 10 VB.NET GUI Components Overview.
Menus Menus provide groups of related commands for windows applications Menu, menu items, submenus A menu item that contains a submenu is considered to.
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
7-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Controls Part 2. DateTimePicker Control Used for representing Date/Time information and take it as input from user. Date information is automatically.
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.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
 A ListBox control displays a list of items and allows the user to select one or more  Drag from Toolbox to create this control on a form.
Unit 6 Repetition Processing Instructor: Brent Presley.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Variables and Expressions Programming Right from the Start with Visual Basic.NET 1/e 7.
Compunet Corporation Programming with Visual Basic.NET Working with Menus and Dialog Boxes Week 14 Tariq Aziz and Kevin Jones.
Understand Databound Controls Windows Development Fundamentals LESSON 4.2A.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
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 BASICS Lesson 9 Nested If Statements and Radio Buttons.
Using Forms and Form Elements In Visual Basic.NET.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 6 Looping and Multiple Forms.
Course ILT Using complex selection structures Unit objectives Include radio buttons and check boxes in an interface, create and call a user- defined Sub.
Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”
COMPUTER PROGRAMMING I Apply Procedures to Develop List Box and Combo Box Objects.
Computing with C# and the .NET Framework
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
البرمجة بلغة فيجول بيسيك
مراحل كتابة البرنامج بلغة فيجول بيسك ستديو
Microsoft Visual Basic 2005: Reloaded Second Edition
المحاضرة الأولى Lab(1) أ.ساره الأحمدي برمجة حاسب 2.
CIS16 Application Development and Programming using Visual Basic.net
CIS 16 Application Development Programming with Visual Basic
Web Development Using ASP .NET
Visual C# - GUI and controls - 1
Group Boxes, Radio buttons and Checked List Boxes
GUI Programming in Visual Studio .NET
CHAPTER FOUR VARIABLES AND CONSTANTS
Presentation transcript:

Compunet Corporation Programming with Visual Basic.NET GUI Chapter 3 Week 13 Tariq Aziz and Kevin Jones

Compunet Corporation Overview Chapter 3 is about using Toolbox controls in Visual Studio.NET. Some common Toolbox controls are: –TextBox –Button –CheckBox –RadioButton –ListBox –ComboBox –DateTimePicker –LinkLabel

Compunet Corporation TextBox The TextBox control provides a way for your program to get text input from the user. He simply types text in the textbox. The text entered by the user is stored in the Text property of the Textbox. You can access it as follows TextBox1.Text

Compunet Corporation TextBox Control

Compunet Corporation Button The Button control provides a way for your program to get click input from the user. He simply clicks a button when he wants to initiate some response from the program. The text displayed inside the button is stored in the Text property of the Button, which is usually defined by the programmer through the Properties window at design time. When the user clicks the button at runtime, the corresponding event procedure is invoked, which will perform the actions associated with the button. By default, the name of the event procedure is the concatenation of the name of the button with the string “_Click”, e.g. Button1_Click() for Button1.

Compunet Corporation Button Control Double-click the button to go to its event procedure.

Compunet Corporation Button1_Click Event Procedure

Compunet Corporation CheckBox The CheckBox control provides a way for your program to get on/off input from the user. The checkbox is a toggle switch; the user clicks in the checkbox to turn it off or on. A group of checkboxes allows the user to select zero or more choices from the group. Selection of one checkbox of a group is independent of the other checkboxes (see radio buttons for contrast). The Checked property stores the on/off state of the checkbox. If the user has checked the checkbox, Checked = True; otherwise, it is False. You can access the Checked property as follows: CheckBox1.Checked

Compunet Corporation CheckBox Control

Compunet Corporation RadioButton The RadioButton control provides a way for your program to get on/off input from the user. The radio button is a toggle switch; the user clicks in the radio button to turn it off or on. A group of radio buttons allows the user to select exactly one choice from the group. The difference between the behavior of a radio button and a checkbox is that when the user clicks a radio button, all other radio buttons in the same group are turned off. The Checked property stores the on/off state of the radio button. If the user has selected the radio button, Checked = True; otherwise, it is False. You can access the Checked property as follows: RadioButton1.Checked

Compunet Corporation RadioButton Control

Compunet Corporation ListBox The ListBox control provides a way for your program to allow the user to choose an item from a list. He simply clicks on the item in the ListBox to select it. All items in the list box appear on the form. The Items property stores the list of items contained in the listbox. There are two ways to define the items in the listbox: – You can click the ellipsis button (…) just to the right of the Items property value in the Properties window to define the list of items at design time, or – You can invoke methods at runtime to add items to the Items list: e.g. ListBox1.Items.Add(“Saudi Riyals”)

Compunet Corporation ListBox Control

Compunet Corporation ListBox.SelectedIndex The SelectedIndex property of the list box stores the index of the list item that was selected by the user. ListBox1.SelectedIndex SelectedIndex counting starts at 0. For example, say we have a list of five items: US Dollar, Saudi Riyal, British Pound, Japanese Yen, and Euro. Each item would have indices 0, 1, 2, 3, and 4, respectively. For example, if the user selects British Pound, the SelectedIndex property of the ListBox would be set to 2.

Compunet Corporation ComboBox The ComboBox control provides a way for the user to select an item from a list. It’s very similar to a ListBox, except that the whole list is not displayed directly on the form. Instead, the list is only displayed when the user clicks the drop-down arrow. Once the user makes his selection, the selection is displayed in the combo box on the form. For this reason, the combo box is also called a drop-down listbox. The combo box also has a SelectedIndex property, which stores the index of the selected item.

Compunet Corporation ComboBox Control

Compunet Corporation Programming Exercise Write a small currency converter that converts between U.S. Dollars, British Pounds, Saudi Riyals, Japanese Yen, and Euros. Your form should contain at least one text box (to get the amount of money in the first currency), two list boxes (to select the first and second currencies), a label (to display the equivalent amount of money in the second currency), and two buttons: Convert and Quit.