Compunet Corporation Programming with Visual Basic.NET GUI Week # 11 Tariq Ibn Aziz.

Slides:



Advertisements
Similar presentations
Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Advertisements

CS0004: Introduction to Programming Visual Studio 2010 and Controls.
© 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,
The Microsoft View: Module 1: Getting Started. Copyright Course 2559B, Introduction to Visual Basic®.NET Programming with Microsoft®.NET. Lecture 1 Microsoft.
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.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 2 Tariq Aziz and Kevin Jones.
 2002 Prentice Hall. All rights reserved. Chapter 2 - Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Overview of the Visual Studio.NET.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Compunet Corporation Programming with Visual Basic.NET GUI Chapter 3 Week 13 Tariq Aziz and Kevin Jones.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Microsoft Visual Basic 2012 CHAPTER TWO Program and Graphical User Interface Design.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
Visual Basic Chapter 1 Mr. Wangler.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
IE 411/511: Visual Programming for Industrial Applications
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 2 Welcome Application Introducing the Visual Basic 2008 Express Edition IDE.
Chapter 3: Using GUI Objects and the Visual Studio IDE.
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.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 2 The Visual Basic.NET Integrated Development Environment.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
Introduction to the Visual Studio.NET IDE (LAB 1 )
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
Microsoft Visual Basic 2010 CHAPTER THREE Program Design and Coding.
BIL528 – Bilgisayar Programlama II Introduction 1.
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
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.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
CSC 157 (Blum)1 Hello World. CSC 157 (Blum)2 Start/Programs/Microsoft Visual Studio.NET 2003/Microsoft Visual Studio.NET 2003.
Ch. 101 Database Management An Introduction to Databases.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 3 Building an Application in the Visual Basic.NET Environment.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Addison Wesley is an imprint of © 2011 Pearson Addison-Wesley. All rights reserved. Chapter 2 Creating Applications with Visual Basic.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
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.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 2 The Visual Basic.NET Integrated Development Environment.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Dive Into® Visual Basic 2010 Express
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
Chapter 2: The Visual Studio .NET Development Environment
Chapter 1: An Introduction to Visual Basic 2015
Visual Basic Code & No.: CS 218
Introduction to Computer CC111
Chapter 2 – Introduction to the Visual Studio .NET IDE
3.01 Apply Controls Associated With Visual Studio Form
Program and Graphical User Interface Design
1. Introduction to Visual Basic
Visual programming Chapter 1: Introduction
3.01 Apply Controls Associated With Visual Studio Form
Visual studio 2010 SENG 403, Tutorial 2 SENG Winter 2011.
Program and Graphical User Interface Design
Social Media And Global Computing Introduction to Visual Studio
Chapter 2 – Introduction to the Visual Studio .NET IDE
Hands-on Introduction to Visual Basic .NET
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:

Compunet Corporation Programming with Visual Basic.NET GUI Week # 11 Tariq Ibn Aziz

Compunet Corporation Graphical User Interface Overview “GUI” stands for “Graphical User Interface”, which provides a way for the user to interact with our program. Nowadays GUI refers to a rectangular area of the screen called a window in which several different kinds of user interface objects appear, such as buttons, text boxes, labels, picture boxes, etc. Designing the GUI means determining which GUI objects may be used to provide the best interface to our program, and how best to present them to the user. We want our programs to be user-friendly, which means they should be intuitive and easy-to-use and understand. We must also “hook-up” our GUI objects to their underlying code.

Compunet Corporation Microsoft Visual Studio.NET Development Environment Thus far in the course, we’ve been using Notepad to type our Visual Basic source code along with the vbc command to compile our code into executable machine code to get an.exe program we can run. Now we’ll use the Microsoft Visual Studio.NET Development Environment, which is an integrated environment in which we can create and edit source code, design our graphical user interface forms, and run our executable code.

Compunet Corporation Starting Visual Studio.NET

Compunet Corporation Solutions, Projects, Files A Solution file (*.sln) may contain information about multiple related projects. A Project file (*.vbproj) may contain information about multiple related source files and/or components. A single Visual Basic source file has the extension.vb. For this course, our solutions are so simple that they will contain a single project, so you can either double-click on the solution file or the project file to launch the Visual Studio.NET program.

Compunet Corporation MS Visual Studio.NET

Compunet Corporation MS Visual Studio.NET The following are some of the most important parts of the MS Visual Studio.NET development environment: Windows Forms Designer Toolbox Solution Explorer Properties Window Output Window

Compunet Corporation Windows Forms Designer This is the main area in the middle of the Visual Studio.NET window. It is a multi-tabbed area where the programmer can create the forms (windows) that make up his graphical user interface. Source code may also be displayed in this area on a separate tab. Note: Double-clicking on a GUI object in the Windows Forms Designer window will take you to its corresponding event-handler procedure in the source code.

Compunet Corporation Windows Forms Designer Tabs

Compunet Corporation Toolbox The toolbox is a collection of GUI objects that you can drag and drop on your form. For example, if you want a to add a button to your form, click Button in the toolbox, drag, and drop on your form. Repeat to add another button, etc.

Compunet Corporation Toolbox

Compunet Corporation Solution Explorer The Solution Explorer window displays your projects and their corresponding files and components. It’s like a table of contents. If you don’t see it, select View, Solution Explorer to open the window. Double-click on the form icon in the Solution Explorer window to make the corresponding form appear in the Windows Forms Designer window.

Compunet Corporation Solution Explorer

Compunet Corporation Properties Window The Properties window displays a list of the properties of the currently-selected GUI object. It also allows the programmer to change or set the properties of GUI objects at design time. To set the property of an object, first select the object. For example, select the Button1 object. We can define the text that appears on the button by setting its text property. For example, scroll the Properties Window to locate the text property. Change “Button1” to “OK”, then press Enter. The button then changes from displaying “Button1”, and now reads “OK”.

Compunet Corporation Properties Window

Compunet Corporation Output Window The Output window, usually located at the bottom of the main Visual Studio.NET window, is where the Visual Studio displays text output to the programmer. For example, when you build (i.e. compile) your program, the output window displays any error messages that might occur, and hopefully eventually displays a “success” message, e.g. “Build succeeded… 0 errors”

Compunet Corporation Output Window

Compunet Corporation Example – Chapter 1 from book Refer to the example from chapter 1 in the book. When we double-click on the Answer button in the Windows Forms Designer window, we end up editing code for the Button1_click event procedure. The Button1_click event procedure is a piece of code that is called whenever the user clicks on Button1 at runtime. This is where we write code that will be executed at runtime whenever the user clicks the button. In this example, we display the answer (in Label2) and the picture (in PictureBox1) by setting their corresponding Visible properties to True.

Compunet Corporation Example – Ch. 1 Double-click the Answer button in Design Window

Compunet Corporation Example – Ch. 1 This event procedure contains code that will be executed when the user clicks the Answer button at run-time.

Compunet Corporation How To Go Back to Form Click this tab to go back to the form design window.

Compunet Corporation Building and Running a Program To build (or compile) a program, select Build Solution from the Build menu. To run a program, select Start from the Debug menu, or simply click the Start (Play) button on the standard toolbar. Note: You must login as “student” (password = “computer”) to use this feature.