Introduction to VB.NET Tonga Institute of Higher Education.

Slides:



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

CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Chapter 1: An Introduction to Visual Basic 2012
© 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,
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
1 Visual Basic.NET Application Overview. 2 Objectives Discuss what a typical Visual Basic.NET application looks like Configure the Visual Studio.NET Integrated.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
CS 2340: Programming in VB Instructor: Dr. Qi Yang Office: 213 Ullrich Phone: YangQ 1.
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
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
Teach Yourself Windows 98 Module 2: Working with Files, Folders, and the Desktop.
IT 211 Project Integration and Deployment Lab #11.
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
1 ADVANCED MICROSOFT WORD Lesson 16 – Customizing Features Microsoft Office 2003: Advanced.
Intro to C++. Getting Started with Microsoft Visual Studios Open Microsoft Visual Studios 2010 Click on file Click on New Project Choose Visual C++ on.
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.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
Chapter 3: Using GUI Objects and the Visual Studio IDE.
2. Introduction to the Visual Studio.NET IDE. Chapter Outline Overview of the Visual Studio.NET IDE Overview of the Visual Studio.NET IDE Menu Bar and.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
CPS120: Introduction to Computer Science Compiling Your Programs Using Visual C++
Introduction to the Visual Studio.NET IDE (LAB 1 )
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
Introduction to ASP.NET T.Ahlam Algharasi. The Visual Studio IDE Start page 2.
Graphical User Interfaces Tonga Institute of Higher Education.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource:
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
1.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi Chapter 2 Introduction to Visual Basic Programming Visual Basic.NET.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Open project in Microsoft Visual Studio → build program in “Release” mode.
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.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
Creating New Forms Projects can appear more professional when using different windows for different types of information. Select Add Windows Form from.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 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.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Programming with Microsoft Visual Basic 2012 Chapter 1: An Introduction to Visual Basic 2012.
Dive Into® Visual Basic 2010 Express
Visual Basic.NET Windows Programming
Development Environment
Chapter 2: The Visual Studio .NET Development Environment
Chapter 1: An Introduction to Visual Basic 2015
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
Visual studio 2010 SENG 403, Tutorial 2 SENG Winter 2011.
CIS16 Application Development Programming with Visual Basic
Presentation transcript:

Introduction to VB.NET Tonga Institute of Higher Education

Programming Basics Program / Application – A set of instructions that a computer uses to do something. Programming / Developing – The act of creating or changing a program Programmer / Developer – A person who makes a program Run / Execute – The act of using a program Source Code – Code written in a programming language by a developer. Every program was created by someone Computers use special languages Programmers use special languages to create or change a program

Introduction to Visual Basic.Net Visual Basic.Net (VB.Net) is a programming language created by Microsoft.  Many programmers use VB.Net VB.Net is an object oriented language.

Impact on Visual Basic 6.0 Visual Basic 6 is old technology Visual Basic 6 will still be used for many years to maintain existing programs The future of Visual Basic development is Visual Basic.NET

Integrated Development Environments (IDEs) IDEs are programs designed to make programming easier.  Graphical Interface is intuitive  Program management is easier  Source code is easier to read  Errors are easier to fix  Too many features to list! You do not need an IDE to create a program. But they are very helpful. There are a few different IDE’s for VB.Net. But most VB.Net developers use Visual Studio.Net. (VS.Net)

First Look at VS.NET Allows you to customize your IDE Options you can look at Different windows you can use

Setting Up Your Environment You cannot save files to the C Drive You must save files to the P Drive We want to organize our files on the P Drive  Use good names  Keep related files in the same location To tell VS.Net to use your P Drive 1. Start VS.Net 2. Go to Tools -> Options 3. Go to Environment -> Project and Solutions 4. Change Visual Studio Projects Location to your folder on the P drive. (You may create a new folder if you click the Browse button) 5. Click OK button

Demonstration Setting up VS.Net

Class Exercise Start VS.Net Setup VS.Net to save to a directory on your P drive

How to Make and Run a Program 1. Create a new project 1. Click on Projects tab 2. Click on New Project button 3. Enter “HelloWorld” as the name of the new project. 4. Make sure that the Windows Application template is selected. 5. Click the OK button 2. Start the application 1. Click on Debug -> Start menu item

Demonstration How to Make and Run a Program HelloWorld

Class Exercise Create a Windows Application The name of the Windows Application is HelloWorld Run the program

Solutions and Projects Solution – An organizer for projects.  A solution can contain many projects Project – An organizer for a program.  A project can include many files. Examples of how Solutions and Projects work together  Molisi Management Solution Customer Project Financial Project Manager Project  Homework 1 Solution Program 1 Program 2  Homework 8 Solution Big Program

Solutions and Projects To make a new solution, go to File -> New -> Blank Solution  A solution can contain many projects To make a new project, go to File -> New -> Project  A project can include many files. The same window is used for creating Solutions and Projects Make sure the correct item Is selected

Projects There are many different kinds of project we can make. This class focuses on Windows Applications Can choose to add to the current solution or create a new solution Make sure your project is saved in the correct folder

Best Practices Keep your Solution and Project names simple and descriptive  Good Examples: Assignment5, Bank, Customer  Bad Examples: ILoveYou, IMissYou, INeedYou Don’t use spaces in your names

Demonstration Creating Solutions and Projects

Adding Forms to a Project A form is a window To add forms to a project: 1. Solution Explorer -> Project Name -> Right Click -> Add -> Add Windows Form 2. Enter the name of the new form

Adding Projects to a Solution To add projects to a solution: 1. Solution Explorer -> Right Click -> Add -> New Project 2. Select the project type 3. Enter the name of the new form

Demonstration Adding Forms to a Project and Adding Projects to a Solution

Setting Startup Projects A solution may contain more than 1 project To tell Visual Studio.NET which project should be started when the solution is run:  Solution Explorer -> Project Name -> Set as Startup Project

Setting Startup Objects Often, your project has more than 1 object that can be started To tell Visual Studio.NET which object should be started when the program is run:  Solution Explorer -> Project Name -> Right Click -> Common Properties -> General -> Startup Object

Demonstration Selecting a Startup Project and Selecting a Startup Object

Stumbling Blocks You can’t change properties when a program is running If you rename a file, make sure you keep the.vb extension Make sure you’re saving to the P drive

Class Exercise Create a solution called MyFirstSolution Create 2 projects inside MyFirstSolution Each project will have 2 forms All 4 forms will have different colors Practice Running each different form

Behind the Scenes - 1 All files are stored on the computer The location is determined by your settings 2 Folders exist  Bin – Contains the files needed to run the program To give the program to someone else, copy these files to their computer The running the.exe file will begin the program  Obj – Contains the files needed to debug (fix) the program These are useful when fixing errors in a program When you start the application this way: Click on Debug -> Start menu item, files are automatically created for you in both folders

Demonstration Creating, Deleting and Executing Files Behind the Scenes

Behind the Scenes - 2 All files are stored on the computer The location is determined by your settings Solutions and Projects use different files  Solutions.sln.suo  Projects AssemblyInfo.vb.vbproj.vbproj.user The organization of the files is determined by the order that you create the solutions and projects in

Demonstration Viewing Solution and Project Files

Behind the Scenes - 3 The organization of the files is determined by the order you create solutions and projects: From a clean start:  If a solution is created first, a folder is created The solution’s name is the name of the folder The solution’s files are inside this folder  If a project is added to the solution, a folder is created inside of the solution folder The project’s name is the name of the folder The project’s files are inside this folder

Demonstration File Organization when Solution is Created First

Behind the Scenes - 4 The organization of the files is determined by the order you create solutions and projects: From a clean start:  If a project is created first, a folder is created The project’s name is the name of the folder The project’s files are inside this folder The solution’s files are also inside this folder

Demonstration File Organization when Project is Created First

Class Activity What will happen for these different solution / project creation scenarios?

Continuing Work on a Program Always open your Solution or Project file.  Solution files:.sln  Project files:.vbproj  Some files depend on other files. If you only open a.vb file, your references may not be correctly setup. Therefore, your application may not work. If you open a project file without a solution file:  The solution files are automatically created  You will be asked to save the files when you exit VS.Net

Demonstration Show how Solution files are automatically created

VS.NET Windows - 1 How do we write programs?  Write the code  Fix any errors Bug - An error in a program Debug – The act of removing errors from a program Many windows are available to help you create code and debug your programs better

VS.NET Windows - 2 Solution Explorer Shows all the projects in your solution Shows all the files in each project ToolBox  Allows you to add controls to your form Properties  Allows you to change object properties Task List  Shows all current syntax errors  Tracks pending changes and additions to code ‘Todo  Right Click on column header and go to Show Tasks to change what is displayed

Demonstration VS.Net Windows

Managing Your Windows Windows can dock in different parts of your screen Many windows docked in the same location are organized with tabs The pin allows you to choose whether you want the windows to hide when you are not using them Only show the windows you want to use! Tabs Docked Windows

Demonstration Managing Windows

VS.NET Features Outlining  #Region “RegionName”  #End Region Intellisense  Helps you choose the word you want to type  Ctrl + Space Autocode  Creates code automatically for you  Use ComboBoxes in code view Lines to Separate Methods

Demonstration Other VS.Net Features