Object Orientated Programming using C#

Slides:



Advertisements
Similar presentations
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Advertisements

1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Visual Basic.net IDE. Integrated Development Environment.
DT265-2 Object Oriented Software Development 2 Lecture 3 : Windows Programming Lecturer Pat Browne
Chapter 3 Introduction to Event Handling and Windows Forms Applications.
Getting Started Example ICS2O curriculum
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.
Microsoft Visual Basic 2012 CHAPTER TWO Program and Graphical User Interface Design.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Visual Basic Chapter 1 Mr. Wangler.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Microsoft Visual Basic 2005: Reloaded Second Edition
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 3 Introducing Visual Basic.NET. 3.1 Visual Basic.NET Windows Programming -Used to create Windows, Web, and Console applications -Uses predefined.
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.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
Integrated Development Environment (IDE)
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Graphical User Interfaces 2 Tonga Institute of Higher Education.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
COMPUTER III. Fundamental Concepts of Programming Control Structures Sequence Selection Iteration Flowchart Construction Introduction to 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.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”
2-1 Chapter 2 Using VB.NET to Create a First Solution.
3.02 APPLY PROPERTIES ASSOCIATED WITH THE CONTROLS Computer Programming I.
Introduction to Visual Basic. NET,. NET Framework and Visual Studio
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
Visual Basic.NET Windows Programming
Chapter 2: The Visual Studio .NET Development Environment
Chapter 1: An Introduction to Visual Basic 2015
Computer Software: Programming
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
Graphical User Interface Concepts: Part I
Program and Graphical User Interface Design
1. Introduction to Visual Basic
How to design a Windows Forms application
3.01 Apply Controls Associated With Visual Studio Form
Introduction to the Visual C# 2005 Express Edition IDE
Using Procedures and Exception Handling
Chapter 2 Visual Basic Interface
Program and Graphical User Interface Design
Social Media And Global Computing Introduction to Visual Studio
Chapter 2 – Introduction to the Visual Studio .NET IDE
المحاضرة الأولى Lab(1) أ.ساره الأحمدي برمجة حاسب 2.
Hands-on Introduction to Visual Basic .NET
The University of Texas – Pan American
Hello World in Visual Basic
Visual Studio.
6. WinForms 2003 C# GUI - Basics.
Understanding the Integrated Development Environment
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
Week 2: WINDOWS PROGRAMMING
Presentation transcript:

Object Orientated Programming using C# Module 201 Object Oriented Programming Lecture 1 – Introduction

Objectives What is the .NET Framework? Introduction to C# Visual Studio Forms Controls Naming conventions

.NET Framework The .NET Framework is A software development environment A runtime engine for Managed Code A platform designed for Internet-Distributed software The .NET Framework is an exciting new computing platform

.NET Framework Microsoft’s vision to introduce an improved programming experience Installed on Windows Operating Systems A software development environment A runtime engine for Managed Code

Architecture Common Language Infrastructure (CLI) .NET libraries are provided as a language-neutral platform Common Language Runtime A runtime provides services from the operating system and hardware The CLR Provides: Memory management Thread management Exception handling Garbage collection Security The CLR allows users to ignore specifics for the CPU and get on with programming the task

.NET Platform Architecture

C# Language Why C# Uses .NET framework Works with common editors Intuitive syntax Powerful features Close syntax to Java

Visual Studio Development tool for the programmer Includes Graphical User Interface (GUI) code editor supporting IntelliSense Syntax building GUI applications web designer class designer database schema designer

Visual Studio Cost Download free version Download C# version Search for Visual Studio Express 2008 Download C# version 30 days free trial – register to continue usage Or make use of DreamSpark Version

Load Visual Studio Menus Solution Explorer Toolbox Code Area Properties Messages Area

Create a Simple Project File -> New

Solution Explorer Displays all projects in solution Shows all files in project Files organisation Project references

Resources Files .resx Efficient and secure method of storing objects within application Images (PNG, BMP, GIF, JPEG, TIFF) Audio Text Strings Icons Access resources programmatically

Window Docking Floating Dockable Tabbed Document Auto hide Hide http://blogs.msdn.com/b/saraford/archive/2004/05/14/132065.aspx

Project Properties

Building Projects Build project (F6) File locations Complies code for platform Creates executable file File locations EXE file

Visual Studio Help

Forms A Form is for the creation of a Graphical User Interface Provides user interaction with the code Positioning of user controls A program can have one or more forms Forms can be various sizes

Form Controls and Properties Form Controls include Buttons Textboxes Radio buttons Check boxes Labels Sliders Tabs List boxes

Form Controls and Properties All controls have a unique name for identification within the code Control size X & Y Colour Screen position All controls don’t necessarily have the same properties

Properties Define the control’s properties Writes code for you

Form Properties Name – String AcceptButton – String CancelButton - String Icon – Windows icon BackColor - RGB Enabled – True/False Font – Style, Size, Colour Location – X,Y MaximizeSize – X/Y MinimizeSize – X/Y Size – X,Y WindowState – Maximize, Minimize, Normal

Button Properties Name – String Text - String BackColor - RGB DialogResult – OK, Cancel, Abort, Retry, Yes, No Enabled – True/False Font – Style, Size, Colour Location – X,Y Size – X,Y TextAlign – Left, Right, Centre, Top, Middle, Bottom TabIndex – int Visable – True/False

Add Controls Add the following controls Change some properties Label Button ListBox TextBox PictureBox Change some properties

Aligning Controls Use this control to align controls on a form In most cases you will need to select two or more controls to align Use the shift key to select multiple controls

Coding in C# and Visual Studio IntelliSense Microsoft's implementation of auto-completion Code is separated into several files AssemblyInfo.cs – Assembly information Author Company Version/build Form.Designer.cs - Form controls Program.cs – application code

Control Naming Controls using in your programs require appropriate naming This aids the developer by: Providing a description of the control Reduces naming conflicts Use a naming convention Modified Hungarian Notation

Simple Naming Conventions [prefixes][Basename] Prefixes - A Prefix is created to mnemonically represent the word it abbreviates, such as "frm" for "form" Basename - The base name is the your own name for the particular object btnOK txtTitle lstNames

Modified Hungarian Notation Control Prefix Label lbl ListBox lst MainMenu mnu RadioButton rad TextBox txt Timer tmr CheckBox chk ComboBox cbo Button btn Form frm GroupBox grp PictureBox pic Horizontal scroll bar hsb

Summary What is the .NET Framework? Introduction to C# Visual Studio Forms Controls Naming conventions

Next Time Primitive data types Maths operators