Dr Dat Tran - Week 1 Lecture Notes 1 Windows Forms Programming Graphical User Interfaces PG (7110) University of Canberra School of Information Sciences.

Slides:



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

 2007 Dr. Natheer Khasawneh. Chapter 13. Graphical User Interface Concepts: Part 1.
Copyright © 2012 Pearson Education, Inc. Chapter 11 MORE WINDOWS CONTROLS & STANDARD DIALOG BOXES.
C# Programming: From Problem Analysis to Program Design1 Programming Based on Events C# Programming: From Problem Analysis to Program Design 3 rd Edition.
Copyright © 2012 Pearson Education, Inc. Chapter 2 Introduction to Visual C#
Copyright © 2014 Pearson Education, Inc. Chapter 2 Creating Applications with Visual Basic.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
Lecture 2 Managing Windows OS Introduction to.NET Framework C# & Microsoft Visual Studio.NET 2008.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Dr Dat Tran - Week 4 Lecture Notes 1 MenuStrip Programming Graphical User Interfaces PG (7110) University of Canberra School of Information Sciences &
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Multiple Forms and Standard Modules
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 1B Introduction (Tutorial)
Chapter 1: An Introduction to Visual Basic 2005 Programming with Microsoft Visual Basic 2005, Third Edition.
Visual Studio.NET Part 2 dbg --- Using the VS.NET Integrated Development Environment.
1 1 Lab1 Ismail M. Romi – IT Dept, PPU, Visual Basic 2005 Programming Tour.
Chapter 3: Using GUI Objects and the Visual Studio IDE.
Chapter 5 Menus, Common Dialog Boxes, and Methods Programming in C#.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
Dr Dat Tran - Week 4 Lecture Notes 1 ToolStrip Programming Graphical User Interfaces PG (7110) University of Canberra School of Information Sciences &
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 2 Creating a User Interface.
File I/O 11_file_processing.ppt
Visual Studio.NET Part 2 dbg --- Using the Integrated Development Environment.
G RAPHICAL U SER I NTERFACE C ONCEPTS : P ART 1 1 Outline Introduction Windows Forms Event-Handling Model - Basic Event Handling.
Copyright © 2014 Pearson Education, Inc. Chapter 2 Creating Applications with Visual Basic.
1 Scroll Bars Providing Scrollbars. 2 Objectives You will be able to: Use Windows Graphics to display tabular information on a Windows form. Add graphics.
COS240 O-O Languages AUBG, COS dept Lecture 33 Title: C# vs. Java (GUI Programming) Reference: COS240 Syllabus.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Lecture 16: Multithreaded Programming. public partial class Form1 : Form { Thread ct; Thread rt; public static int circle_sleep = 0; public static int.
BIL528 – Bilgisayar Programlama II Introduction 1.
Lecture 6: Introduction to Graphical User Interfaces (GUIs)
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
Introduction to Web Services. Examples Using a Web Service Creating a new Web Service.
C# GUI - Basics. Objectives.NET supports two types: WinForms, traditional, desktop GUI apps. WebForms – newer, for Web apps. Visual Studio.NET supports.
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.
Windows Presentation Foundation (WPF). Introduction Separates appearance of user interface from behavior Appearance usually specified by XAML Behavior.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Common Dialogs.  What is a Common Dialog/Why use them?  Open Dialog  Save File As Dialog  Color Dialog  Font Dialog  Print Dialog.
Dr Dat Tran - Week 2 Lecture Notes 1 Forms Programming Graphical User Interfaces PG (7110) University of Canberra School of Information Sciences & Engineering.
Computer Programming and Basic Software Engineering 9 Building Graphical User Interface Creating a Multiple-Form Interface.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
1 Printing a Document. 2 Objectives You will be able to print a real multipage document.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 3 Building an Application in the Visual Basic.NET Environment.
Graphical User Interface Components Version 1.1. Obectives Students should understand how to use these basic Form components to create a Graphical User.
Addison Wesley is an imprint of © 2011 Pearson Addison-Wesley. All rights reserved. Chapter 2 Creating Applications with Visual Basic.
1 Windows Forms II Chapter RadioButton / GroupBox Controls Used to solicit a multiple choice input. Radio buttons work as a group. Selecting one.
1 15. Building Applications with Windows Forms Why Use Windows Forms? Structure of Windows Forms Using Windows Forms Using Controls Code Samples.
1 Working with Controls at Run Time. 2 Objectives You will be able to Add controls to a Windows form at run time. Modify controls at run time.
Creating New Forms Projects can appear more professional when using different windows for different types of information. Select Add Windows Form from.
GUI Programming Prepared by: Ahmad Ramin Rahimee Assistant Professor ICTI.
Module 3: Creating Windows-based Applications. Overview Creating the Main Menu Creating and Using Common Dialog Boxes Creating and Using Custom Dialog.
Timed Math Quiz. In This Part, You Learn How to Generate random numbers by using the Random class. Trigger events to occur at a specific time by using.
Chapter 8 Multiple Forms, Modules, and Menus. Introduction This chapter demonstrates how to: – Add multiple forms to a project – Create a module to hold.
Chapter 1: An Introduction to Visual Basic .NET
Visual Basic .NET BASICS
Microsoft Visual Basic 2005: Reloaded Second Edition
Microsoft Visual Basic 2005 BASICS
Apply Procedures to Develop Message, Input, and Dialog Boxes
Reference: COS240 Syllabus
Chapter 1: An Introduction to Visual Basic 2015
MFC Dialog Application
Multi-form applications and dialogs
Lecture Set 7 Procedures and Event Handlers
Copyright © 2006 Thomas P. Skinner
Building an Application in the Visual Basic .NET Environment
Lecture Set 11 Creating and Using Classes
Module 8: Creating Windows-based Applications
6. WinForms 2003 C# GUI - Basics.
Understanding Buttons and TextBoxes
Presentation transcript:

Dr Dat Tran - Week 1 Lecture Notes 1 Windows Forms Programming Graphical User Interfaces PG (7110) University of Canberra School of Information Sciences & Engineering

Dr Dat Tran - Week 1 Lecture Notes 2 VS.NET 2005 Start Page

Dr Dat Tran - Week 1 Lecture Notes 3 Windows Application

Dr Dat Tran - Week 1 Lecture Notes 4 Windows Application Project

Dr Dat Tran - Week 1 Lecture Notes 5 Form Properties

Dr Dat Tran - Week 1 Lecture Notes 6 Build & Debug Project

Dr Dat Tran - Week 1 Lecture Notes 7 Program.cs File

Dr Dat Tran - Week 1 Lecture Notes 8 MainForm.Designer.cs File

Dr Dat Tran - Week 1 Lecture Notes 9 Change Some Properties Try StartPosition & Location properties

Dr Dat Tran - Week 1 Lecture Notes 10 StartPosition - FormBorderStyle CentreParent only for modal dialogs (to prevent multi-monitor confusion) CentreScreen only for the main form or a splash screen WindowsDefaultLocation for everything else, to prevent windows from appearing on top of one another FixedDialog only for modal dialog boxes FixedSingle only for the main form None for splash screen Sizable for everything else, almost all forms in an application should be resizable

Dr Dat Tran - Week 1 Lecture Notes 11 Write Code in Program.cs

Dr Dat Tran - Week 1 Lecture Notes 12 Write Code in MainForm.Designer.cs

Dr Dat Tran - Week 1 Lecture Notes 13 Add a New Form At design time At run time Double-click on the form to add the Load event handler and modify it as follows Try ShowDialog()

Dr Dat Tran - Week 1 Lecture Notes 14 Example: partial class public partial class MainForm : Form public partial class MainForm : Form { public MainForm() { public MainForm() { InitializeComponent(); InitializeComponent(); } private void MainForm_Load(object sender, EventArgs e) { private void MainForm_Load(object sender, EventArgs e) { f2.ShowDialog(); f2.ShowDialog(); } } public partial class MainForm : Form public partial class MainForm : Form { Form f2 = new Form(); Form f2 = new Form(); }

Dr Dat Tran - Week 1 Lecture Notes 15 Message Box

Dr Dat Tran - Week 1 Lecture Notes 16 Use DialogResult private void MainForm_Load(object sender, EventArgs e) { DialogResult ds = MessageBox.Show("Hello World", "PGUI", DialogResult ds = MessageBox.Show("Hello World", "PGUI", MessageBoxButtons.YesNoCancel); MessageBoxButtons.YesNoCancel); if (ds == DialogResult.Yes) if (ds == DialogResult.Yes) { f2.Text = "Yes"; f2.Text = "Yes"; f2.ShowDialog(); f2.ShowDialog(); } if (ds == DialogResult.No) if (ds == DialogResult.No) { f2.Text = "No"; f2.Text = "No"; f2.ShowDialog(); f2.ShowDialog(); }}