Graphical User Interfaces 2 Tonga Institute of Higher Education.

Slides:



Advertisements
Similar presentations
Information System Design Lab 5&6. User Interface Design.
Advertisements

Pemrograman VisualMinggu …8… Page 1 MINGGU Ke Delapan Pemrograman Visual Pokok Bahasan: Graphical User Interface Tujuan Instruksional Khusus: Mahasiswa.
Using Macros and Visual Basic for Applications (VBA) with Excel
Chapter 3.1 Controls Programming In Visual Basic.NET.
Chapter 2 More Controls Programming In Visual Basic.NET.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
C# Programming: From Problem Analysis to Program Design1 Programming Based on Events C# Programming: From Problem Analysis to Program Design 3 rd Edition.
Graphical User Interface (GUI) A GUI allows user to interact with a program visually. GUIs are built from GUI components. A GUI component is an object.
Chapter 2 More Controls Programming In Visual Basic.NET.
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.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Slide 1 Chapter 2 Visual Basic Interface. Slide 2 Chapter 2 Windows GUI  A GUI is a graphical user interface.  The interface is what appears on the.
Visual Basic Chapter 1 Mr. Wangler.
BIM313 – Advanced Programming Simple Controls 1. Contents Traditional Controls – Labels, Text Boxes, Buttons, Check Boxes, List Boxes, Combo Boxes Advanced.
IE 411/511: Visual Programming for Industrial Applications
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
CIS 115 Lecture 3.  Forms  Form properties  Controls  Control properties  Event Driven Programming  Form Events  Control Events  Event Handlers.
Chapter 3 Introducing Visual Basic.NET. 3.1 Visual Basic.NET Windows Programming -Used to create Windows, Web, and Console applications -Uses predefined.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Chapter 1: An Introduction to Visual Basic 2005 Programming with Microsoft Visual Basic 2005, Third Edition.
Week 2: WINDOWS PROGRAMMING Chapter 15 in “Beginning Visual C# 2010” ebook Chapter 4 in “”MCTS_Self-Paced_Training_Kit” ebook.
Chapter 12: Using Controls. Examining the IDE’s Automatically Generated Code A new Windows Forms project has been started and given the name FormWithALabelAndAButton.
Website Development with Dreamweaver
Chapter 2 More Controls Programming in C#. NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Assignment #1 Advanced Computer Programming.
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 2 Creating a User Interface.
Chapter 2 - More Controls More controls – Text boxes - used for user input – Frames - containers to group items – check boxes - user select an option -
CIS 338: VB.NET Components Dr. Ralph D. Westfall April, 2011.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 13 – Graphical User Interfaces Part 2 Outline.
Graphical User Interface Concepts - Part 2 Session 09 Mata kuliah: M0874 – Programming II Tahun: 2010.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Chapter Two Designing Applications Programming with Microsoft Visual Basic th Edition.
Graphical User Interfaces Tonga Institute of Higher Education.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Chapter 2 – Introduction to the Visual Studio .NET IDE
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 C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
More Controls and Their Properties Part 4 dbg --- TextBox, CheckBox, RadioButton, GroupBox, ToolTips,
CSC115 Introduction to Computer Programming Zhen Jiang Dept. of Computer Science West Chester University West Chester, PA 19383
More User Interface Controls User interface controls are located in the toolbox. Click the +/- signs to open/ close the different tabs of the tollbox.
2-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
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.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
Graphical User Interfaces Tonga Institute of Higher Education.
AdditionalControls 1. The MenuStrip 2 Double-click Let’s begin to design the menu bar for VB! Let’s begin to design the menu bar for VB! 3.
Chapter 2 More Controls Programming in C#. NET Objectives Use text boxes, group boxes, check boxes, radio buttons, and picture boxes effectively.
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.
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.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
COMPUTER PROGRAMMING I Apply Procedures to Develop List Box and Combo Box Objects.
Graphical User Interface Concepts - Part 1 Session 08 Mata kuliah: M0874 – Programming II Tahun: 2010.
3.02 APPLY PROPERTIES ASSOCIATED WITH THE CONTROLS Computer Programming I.
Visual Basic.NET Windows Programming
Object Orientated Programming using C#
CSCI 3328 Object Oriented Programming in C# Chapter 2: Introduction to Visual C# Programming UTPA – Fall 2012 This set of slides is revised from lecture.
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
Chapter 2 Visual Basic Interface
Chapter 2 – Introduction to the Visual Studio .NET IDE
Visual Studio.
Visual C# - GUI and controls - 1
Programming In Visual Basic.NET
Chapter 2 User Interface Design
Week 2: WINDOWS PROGRAMMING
Presentation transcript:

Graphical User Interfaces 2 Tonga Institute of Higher Education

Introduction There are many controls you can use to create professional software applications  Form  Label  LinkLabel  TextBox  Etc. We are going to cover the basic controls

Naming Conventions Each control has a name This name is used to reference the control Different companies use different prefixes in the name to identify controls  Button – btn, cmd  CheckBox – chk  ColumnHeader - colhdr  ComboBox – cbo  Form - frm  GroupBox – gbx, grp  Label – lbl  LinkLabel - lnk  ListView – lvw, lst  MainMenu – mmu  MenuItem - mnu  Panel - pnl  PictureBox – pbx, pic  RadioButton – rad, rdo, opt  Tab Control - tab  Tab Page – tabpag  TextBox – txt Use the ones you like Be consistent!

Form - 1 A window that makes up an application's user interface. Useful Properties  AutoScroll Determines whether scroll bars should automatically appear if the form’s contents use more space than the size of the form  BackColor Determines the background color of the form  FormBorderStyle Determines the style of the border  Sizeable  Fixed  Etc.  Location Determines the current location of the form on the screen

Form - 2 Useful Properties  MaxSize Determines the maximum size the form is allowed to be  MinSize Determines the minimum size the form is allowed to be  MaximizeBox Determines whether a maximize box is displayed in the top right corner  MinimizeBox Determines whether a minimize box is displayed in the top right corner  Name Determines the name used to reference this form in your code  Size Determines the current size of the form  StartPosition Determines the location of the form when this form is first displayed  Windows Default  Center Screen  Etc.  Text Determines the text displayed at the top of the form  WindowState Determines the state of the window when you start the program  Minimized  Maximized  Normal

Demonstration Form

Label - 1 Displays text Useful Properties  BackColor Determines the background color of the control  Border Style Determines the border surrounding the control  None  FixedSingle  Fixed3D  Enabled Determines whether the user can use the control  Font Determines the font of the text displayed Label

Label - 2 Useful Properties  Location Determines the current location of the control on the form  Name Determines the name of the control used to reference this control in your code  Size Determines the current size of the control  TabIndex Determines the index of the Tab order that this control will occupy  TextAlign Determines the alignment of the text  Text Determines the text displayed  Visible Determines the visibility of the control  Anchor Anchors the control to an edge of a container so a side of the control grows gracefully  Dock Docks the control in a location in a container so the control grows gracefully

Demonstration Label

LinkLabel - 1 Displays a link. When this link is clicked, code is executed. Useful Properties  ActiveLinkColor Determines the color of the link when you click on it  BackColor Determines the background color of the control  Border Style Determines the border surrounding the control  None  FixedSingle  Fixed3D  Enabled Determines whether the user can use the control  Font Determines the font of the text displayed

LinkLabel - 2 Useful Properties  LinkColor Determines the color of the link  Location Determines the current location of the control on the form  Name Determines the name of the control used to reference this control in your code  Size Determines the current size of the form  TabIndex Determines the index of the Tab order that this control will occupy  Text Determines the text displayed  TextAlign Determines the alignment of the text  Visible Determines the visibility of the control  Anchor Anchors the control to an edge of a container so a side of the control grows gracefully  Dock Docks the control in a location in a container so the control grows gracefully

Demonstration LinkLabel

TextBox - 1 Allows user to input text Useful Properties  AcceptsReturn Determines whether a return will enter a blank line or move to the next control  AcceptsTab Determines whether a tab will enter a tab or move to the next control  BackColor Determines the background color of the control  Border Style Determines the border surrounding the control  None  FixedSingle  Fixed3D  Enabled Determines whether the user can use the control  Font Determines the font of the text displayed ScrollBars TextBox

TextBox - 2 Useful Properties  Location Determines the current location of the control on the form  Multiline Determines whether the textbox has multiple lines  MaxLength Determines the maximum length of text the user is allowed to enter  Name Determines the name of the control used to reference this control in your code  ReadOnly Determines whether the control is editable  Size Determines the size of the control  TabIndex Determines the index of the Tab order that this control will occupy  TabStop Determines whether the tab order will stop at this control  Text Determines the text displayed  TextAlign Determines the alignment of the text  Visible Determines the visibility of the control  Anchor Anchors the control to an edge of a container so a side of the control grows gracefully  Dock Docks the control in a location in a container so the control grows gracefully

Demonstration TextBox

ComboBox - 1 Allows user to select from a number of options Useful Properties  BackColor Determines the background color of the control  DropDownStyle Determines the appearance and functionality  Simple  DropDown  DropDownList (Forces a user to select available options)  Enabled Determines whether the user can use the control  Font Determines the font of the text displayed  Items Determines the options that a user can select from  Location Determines the current location of the control on the form ComboBox

ComboBox - 2 Useful Properties  MaxLength Determines the maximum length of text the user is allowed to enter  Name Determines the name of the control used to reference this control in your code  Size Determines the current size of the control  Sorted Determines whether the selectable items are alphabetically ordered  TabIndex Determines the index of the Tab order that this control will occupy  TabStop Determines whether the tab order will stop at this control  Text Determines the text displayed  Visible Determines the visibility of the control  Anchor Anchors the control to an edge of a container so a side of the control grows gracefully  Dock Docks the control in a location in a container so the control grows gracefully

ComboBox – 3 The String Collection Editor is used to enter options This can be accessed by clicking on the button in the Item property

Demonstration ComboBox

CheckBox - 1 Allows user to enter a true/false value Useful Properties  BackColor Determines the background color of the control  CheckAlign Determines the alignment of the checkbox  Checked Determines whether the checkbox is checked or not  Enabled Determines whether the user can use the control  Font Determines the font of the text displayed CheckBox

CheckBox - 2 Useful Properties  Name Determines the name of the form used to reference this control in your code  Location Determines the current location of the control on the form  Size Determines the current size of the control  TabIndex Determines the index of the Tab order that this control will occupy  TabStop Determines whether the tab order will stop at this control  Text Determines the text displayed  TextAlign Determines the alignment of the text  Visible Determines the visibility of the control  Anchor Anchors the control to an edge of a container so a side of the control grows gracefully  Dock Docks the control in a location in a container so the control grows gracefully

Demonstration CheckBox

ListView - 1 Allows user to see a list of text Useful Properties  BackColor Determines the background color of the control  BorderStyle Determines the style of the border  Sizeable  Fixed  Etc.  Columns Determines the columns displayed  Enabled Determines whether the user can use the control  FullRowSelect Determines whether a full row can be selected  Gridlines Determines whether gridlines are displayed  Items Determines the items displayed

ListView - 2  Location Determines the current location of the control on the form  MultiSelect Determines whether multiple items can be selected  Name Determines the name of the control used to reference this control in your code  Scrollable Determines whether scrollbars will be available if the number of items exceeds the room available to display them  Size Determines the current size of the control  TabIndex Determines the index of the Tab order that this control will occupy  TabStop Determines whether the tab order will stop at this control  View Determines the type of view that is displayed  LargeIcon  SmallIcon  Details  List  Visible Determines the visibility of the control  Anchor Anchors the control to an edge of a container so a side of the control grows gracefully  Dock Docks the control in a location in a container so the control grows gracefully

ListView - 3 The ListViewItem Collection Editor is used to enter options This can be accessed by clicking on the button in the Item property

Demonstration ListView

Panel Allows user to make a container for other controls Useful Properties  Location Determines the current location of the control on the form  Name Determines the name of the control used to reference this control in your code  Size Determines the current size of the control  Visible Determines the visibility of the control  Anchor Anchors the control to an edge of a container so a side of the control grows gracefully  Dock Docks the control in a location in a container so the control grows gracefully

Demonstration Panel

RadioButton - 1 Allows user to select from a number of options Useful Properties  BackColor Determines the background color of the control  Enabled Determines whether the user can use the control  Font Determines the font of the text displayed  Location Determines the current location of the control on the form  Checked Determines whether the radiobutton is checked or not  CheckAlign Determines the alignment of the checkbox Radio Button

RadioButton - 2 Useful Properties  Name Determines the name of the control used to reference this control in your code  Size Determines the current size of the control  TabIndex Determines the index of the Tab order that this control will occupy  TabStop Determines whether the tab order will stop at this control  Text Determines the text displayed  TextAlign Determines the alignment of the text  Visible Determines the visibility of the control  Anchor Anchors the control to an edge of a container so a side of the control grows gracefully  Dock Docks the control in a location in a container so the control grows gracefully

Demonstration RadioButton

GroupBox - 1 Allows user to see related items grouped together Useful Properties  BackColor Determines the background color of the control  Enabled Determines whether the user can use the control  Font Determines the font of the text displayed  Location Determines the current location of the control on the form  Name Determines the name of the control used to reference this control in your code GroupBox

GroupBox - 2 Useful Properties  Size Determines the current size of the form  TabIndex Determines the index of the Tab order that this control will occupy  Text Determines the text displayed  Visible Determines the visibility of the control  Anchor Anchors the control to an edge of a container so a side of the control grows gracefully  Dock Docks the control in a location in a container so the control grows gracefully

Demonstration GroupBox

PictureBox Allows user to see pictures Useful Properties  Image Determines the image displayed  Sizemode Determines the how the picture is displayed in relation to the size of the control  Location Determines the current location of the control on the form  Name Determines the name of the control used to reference this control in your code  Size Determines the current size of the control  Visible Determines the visibility of the control  Anchor Anchors the control to an edge of a container so a side of the control grows gracefully  Dock Docks the control in a location in a container so the control grows gracefully PictureBox

Demonstration PictureBox

Tab Control Allows user to use tabs Useful Properties  Location Determines the current location of the control on the form  Name Determines the name of the control used to reference this control in your code  Size Determines the current size of the control  Visible Determines the visibility of the control  TabPages Add tab pages  Anchor Anchors the control to an edge of a container so a side of the control grows gracefully  Dock Docks the control in a location in a container so the control grows gracefully Tab Control

Demonstration Tab Control

MainMenu Control Allows user to use main menus Useful Properties  Name Determines the name of the control used to reference this control in your code A MainMenu control contains many MenuItem controls Separation lines can be inserted by right clicking on a blank menuitem displaying Type Here and selecting Insert Separator On the form containing the menu, make sure to select the proper menu to display A form can have multiple menus but only 1 can be displayed at a time An underline can be achieve by using & in the text property. This allows users to use hot keys to navigate through a menu MenuItem hotkeys can be added through the shortcut property MainMenu Control

Demonstration MainMenu Control