Understand Windows Forms Applications and Console-based Applications

Slides:



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

Graphical User Interface (GUI) Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Interpret Application Specifications
Objectives Machine language vs.. High-level language Procedure-oriented, object-oriented, and event- driven languages Background of Visual Basic VB Integrated.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
IE 411/511: Visual Programming for Industrial Applications
Visual Basic 101.
CHAPTER TWO INTRODUCTION TO VISUAL BASIC © Prepared By: Razif Razali 1.
Chapter Two Creating a First Project in Visual Basic.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Understanding Desktop Applications Lesson 5. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Windows Forms Applications Understand.
CMPF124 Personal Productivity With Information Technology Chapter 1 – Part 2 Introduction to Windows Operating Systems Manipulating Windows GUI CMPF 124.
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Overview of Previous Lesson(s) Over View 3 Program.
Understanding Desktop Applications Lesson 5. Understanding Windows Forms Applications Windows Forms applications are smart client applications consisting.
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 6: The User Interface (UI) Dave.
Fundamentals of Windows Mouse n 4 Basic Operations: –Pointing –Clicking –Double Clicking –Dragging.
The New User Interface MEDITECH Training & Education.
Dive Into® Visual Basic 2010 Express
Introduction to Windows Programming
Visual Basic.NET Windows Programming
Multiple document interface (MDI)
Visual Basic 2010 How to Program
Chapter 2: The Visual Studio .NET Development Environment
Getting Started with Application Software
Working in the Forms Developer Environment
Chapter 1: An Introduction to Visual Basic 2015
Visual Basic Code & No.: CS 218
Introduction to Computer CC111
Introduction to Event-Driven Programming
Computing Fundamentals
Introduction to Visual Basic 2008 Programming
Event-driven programming
Chapter 2 – Introduction to the Visual Studio .NET IDE
Console and GUI Programs
Unit 2 User Interface Design.
1. Introduction to Visual Basic
Standard Controls.
Lesson 1: Buttons and Events – 12/18
Chap 7. Building Java Graphical User Interfaces
Graphical User Interfaces -- Introduction
Chapter 2 Visual Basic Interface
Exploring the Basics of Windows XP
Microsoft Windows 2000 Professional
VISUAL BASIC.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Hands-on Introduction to Visual Basic .NET
Tonga Institute of Higher Education
Computers Are Your Future
CIS16 Application Development Programming with Visual Basic
Windows xp PART 1 DR.WAFAA SHRIEF.
Windows 7                      .
CIS16 Application Development – Programming with Visual Basic
Microsoft Windows 7 Basics
Exploring the Basics of Windows XP
Visual Studio.
Multithreaded Programming
Web Development Using ASP .NET
Tonga Institute of Higher Education
Model, View, Controller design pattern
Microsoft Office Illustrated Fundamentals
Programming with Microsoft Visual Basic 2008 Fourth Edition
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
Chapter 4 Enhancing the Graphical User Interface
Microsoft Office Word 2003 Lesson 1
Presentation transcript:

Understand Windows Forms Applications and Console-based Applications LESSONS 5.1 and 5.2 98-361 Software Development Fundamentals Understand Windows Forms Applications and Console-based Applications

Lesson Overview Students will understand Windows® Forms applications and console-based applications. In this lesson, you will learn about: The Windows Forms event model Visual inheritance The use of Multiple Document Interface (MDI) and Single Document Interface (SDI) applications Characteristics and capabilities of console-based applications

Guiding Questions What is a Windows Form application? What is visual inheritance, and what is its purpose? What are MDI and SDI applications? What are the characteristics and capabilities of console-based applications?

Activator Name multiple ways a user can interact with a program. Be specific. You might want to open up a program to give them a context to address this question. Some possible answers: typing in text, clicking buttons, sliding bars, clicking graphics, and dragging the mouse. Explain that the Windows Forms event model is responsible for calling on the program to react to user input.

Review Terms event–an action or occurrence, often generated by the user, to which a program might respond. Examples: key presses, button clicks, and mouse movements. user interface–the portion of a program with which a user interacts. Types of user interfaces (UIs) include command-line interfaces, menu-driven interfaces, and graphical user interfaces. Windows Forms–a rich Windows client library for building Windows client applications.

Windows Forms Applications Programs that run on a user’s Windows-based computer. Contain controls to create a UI and code to manipulate data. Coded in the Microsoft® Visual Studio® Integrated Development Environment (IDE). Windows Forms refers to the set of managed libraries used to simplify common application tasks. 6

Windows Forms Applications (continued) Can display information, request input from users, and communicate with computers over a network. A form is a visual surface on which you display information to the user. Controls are added and responses to user actions, such as mouse clicks or key presses, are coded. A control is a UI element that displays data or accepts data input. 7

Why use a Windows Form? The interface corresponds to the operating system, so the application is integrated with the desktop. The UI is consistent. It has a higher processing demand than a Web application. Security and reliability is important. 8

Windows Forms Event Model When a user does something to your form or one of its controls, the action generates an event. An event is an action that you can respond to in code. The application uses code to react to the event and process the event when it occurs. The event handler is a procedure in the code that determines what actions are performed when an event occurs. When the event is raised, the event handler(s) that receive the event are executed. Demonstrate the event model by creating a simple button in a Windows form and showing how a click of the button engages code that will cause output. 9

Visual Inheritance Why use visual inheritance? A project requires a form similar to one used in a previous project. A basic form or control layout will be used as a template and will be modified for different situations later on. Form inheritance enables you to create a base form and then inherit from it and make modifications, while preserving whatever original settings you need. Relate visual inheritance to inheritance in object-oriented programming. 10

Visual Inheritance: Examples //Visual Basic Public Class Form2 Inherits Namespace1.Form1 //C# public class Form2: Namespace1.Form1 The reference should include the namespace that contains the form, followed by a period, and then the name of the base form itself. When inheriting forms, keep in mind that issues may arise with regard to event handlers being called twice because each event is being handled by both the base class and the inherited class. 11

Single Document Interface (SDI) Each document frame window is separate from others. Each window contains its own menu and toolbar and does not have a background or parent window. 12

Multiple Document Interface (MDI) Multiple document frame windows may be open in the same instance of an application. An MDI application has a window within which multiple MDI child windows, which are frame windows themselves, can be opened, each containing a separate document. You can recognize an MDI application by the inclusion of a Windows menu item with submenus for switching between windows or documents. In some applications, the child windows can be of different types, such as chart windows and spreadsheet windows. In that case, the menu bar can change as MDI child windows of different types are activated. A version of Microsoft Excel® using an MDI 13

Choosing between SDI and MDI Why use SDI? When it is unlikely that more than one window is needed. Example: When using a calendar application, it is unlikely that you would need more than one calendar open at a time. Why use MDI? When more than one window is needed. Example: When processing insurance claims, an employee often needs to work on more than one claim at a time and has to compare claims side by side. The trend is going away from MDIs, where you can just switch back and forth between two application windows as easily as you can switch back and forth between two windows in the same application. When you have different types of windows in one application (for example, Quicken, which has report windows and registry windows), MDIs make more sense. 14

Console-based Applications A program that uses a text-only interface and usually requires only a keyboard for input. They typically run in a command window, such as the Win32® console. Images and video cannot be displayed. Useful on older computers that may be slow to render image content. Why use a console application? Speed of deployment Ease of use Many different types of program can exist as console-based applications: Web browsers, e-mail clients, text editors, and even audio players. 15

Lesson Review What is a Windows Form application? What is visual inheritance, and what is its purpose? What are MDI and SDI applications? What are the characteristics and capabilities of console-based applications? Refer back to the corresponding slides in this presentation for the answers to these questions.