Dr. Abraham Professor UTPA Graphical User Interface.

Slides:



Advertisements
Similar presentations
Pemrograman VisualMinggu …8… Page 1 MINGGU Ke Delapan Pemrograman Visual Pokok Bahasan: Graphical User Interface Tujuan Instruksional Khusus: Mahasiswa.
Advertisements

© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Chapter 1: An Introduction to Visual Basic.NET Programming with Microsoft Visual Basic.NET, Second Edition.
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.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
110-C1 Chapter 2 of the text: _ text boxes, group boxes, check boxes, radio buttons, picture boxes _ defining access keys tab sequence setting the focus.
CS0004: Introduction to Programming Events. Review  Event Procedure  A set of instructions to be executed when a certain event happens.  Many event-driven.
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 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
1 Graphical User Interfaces Part 2 Outline Multiple Document Interface (MDI) Windows Visual Inheritance User-Defined Controls.
CSCI 3327 Visual Basic Chapter 10: Windows Forms GUI: A Deeper Look UTPA – Fall 2011.
IE 411/511: Visual Programming for Industrial Applications
CSCI 3328 Object Oriented Programming in C# Chapter 2: Introduction to Visual C# Programming 1 Xiang Lian The University of Texas Rio Grande Valley Edinburg,
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Chapter 12: Using Controls. Examining the IDE’s Automatically Generated Code A new Windows Forms project has been started and given the name FormWithALabelAndAButton.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Typing Application Introducing Keyboard Events, Menus, Dialogs and the Dictionary.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Assignment #1 Advanced Computer Programming.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
Introduction to Visual Basic.NET Chapter 2 Introduction to Controls, Events.
Lecture Set 13 Drawing Mouse and Keyboard Events Part B – Mouse and Keyboard Events.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Introduction to Visual Basic.NET Your First Visual Basic.NET Application.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 12 - Graphical User Interface Concepts: Part.
Visual C# 2012 How to Program 1. 2  A graphical user interface (GUI) allows a user to interact visually with a program.  Figure 14.1 shows a Visual.
Graphical User Interfaces 2 Tonga Institute of Higher Education.
Practical Programming COMP153-08S Lecture 1: Starting to program.
COM148X1 Interactive Programming Lecture 7. Topics Today HCI Event Handling.
CC111 Lec7 : Visual Basic 1 Visual Basic(1) Lecture 7.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
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.
CS324e - Elements of Graphics and Visualization Java GUIs - Event Handling.
Lesson No: 6 Introduction to Windows XP CHBT-01 Basic Micro process & Computer Operation.
CSC 230 (Blum)1 Visual Basic 2005 Hello World Fall 2005 T. Blum.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
Michael Olivero Microsoft Student Ambassador for FIU Pick up your free drink below to your left. 1 per person please.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Introduction to VB programming Dr. John P. Abraham UTPA Chapters 2 & 3.
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.
Graphical User Interface Concepts - Part 1 Session 08 Mata kuliah: M0874 – Programming II Tahun: 2010.
ALMAJMA'AH UNIVERSITY College of Science and Humanitarians Studies in Alghat Information Technology Section (211Tal course) 1.
Dive Into® Visual Basic 2010 Express
Chapter 1: An Introduction to Visual Basic .NET
UNIT 1 Lesson 1 Introduction.
Chapter 1: An Introduction to Visual Basic 2015
Introduction to Computer CC111
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 8: Writing Graphical User Interfaces
Chapter 2 – Introduction to the Visual Studio .NET IDE
GUI Programming using Windows Form
3.01 Apply Controls Associated With Visual Studio Form
Graphical User Interface Concepts: Part I
1. Introduction to Visual Basic
3.01 Apply Controls Associated With Visual Studio Form
Introduction to VB programming
Chapter 2 – Introduction to the Visual Studio .NET IDE
The University of Texas – Pan American
Visual C# - GUI and controls - 1
CIS 338: Images on Forms Dr. Ralph D. Westfall May, 2009.
Reading from File & Picture Boxes
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
GUI Programming in Visual Studio .NET
Presentation transcript:

Dr. Abraham Professor UTPA Graphical User Interface

Forms Forms used to create GUIs for programs and it is a container for controls and components. Active window has a highlighted title bar and It has the focus When a control or component is dragged onto the form, visual studio generates code for it and can be viewed. A programmer can write the code to place these controls as well. See the example of adding pictures I discussed in class.

Coding to add a button Friend WithEvents BtnMine As System.Windows.Forms.Button Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load BtnMine = New System.Windows.Forms.Button BtnMine.Location = New System.Drawing.Point(20, 20) BtnMine.Name = "BtnMine" BtnMine.Size = New System.Drawing.Size(75, 23) BtnMine.Text = "My Button" Controls.Add(BtnMine) End Sub

Code generated for picture box PictureBox1 = New PictureBox PictureBox1.Image = Global.windowsForms.My.Resources.Resources._1 Me.PictureBox1.Location = New System.Drawing.Point(12, 51) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(74, 97) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(284, 264) Me.Controls.Add(Me.PictureBox1)

Now look at the program I discussed in class ‘PictureName = InputBox("What is the Name of the Picture?", "Picture") PictureName = "C:\vb2008\addPictures\" + PictureName pictBox = New PictureBox Controls.Add(pictBox) pictBox.BringToFront() pictBox.Image = Image.FromFile(PictureName) pictBox.Top = offset pictBox.Width = 100 pictBox.Height = 100 pictBox.Left = offset offset = offset + 10

Change parameters in the code generated Example comment picture box location Add picturebox1.top Etc. You can learn coding for controls like this

Control Properties & Layout Tab Index Enabled – focus Anchor (remain at fixed distance from the sides) Docking (Attaches a control to a container) Labels, TextBoxes and Buttons. Password Textboxt box hides information typed. Checkboxes,comboboxes, and radio buttons Groupboxes and Panels to arrange controls and group them.

Keyboard & mouse Event Handling MouseEnter, MouseLeave, MouseDown, MouseUp, MouseMove, MovesHover KeyDown, KeyUp, KeyPress, KeyChar, Handled, Alt, Control, Shift, etc.

Rich Text Box Writing a text editor. File Opening and Reading Writing to File Drop Down Menus Context Sensitive Menus Changing Font attributes See demo

Other Features Splash Screen Check boxes and dropdown lists covered earlier Background color change Fade-in effect Button tricks See math game demo

Printing to Default Printer See demo