Creating a Console Application with Visual Studio

Slides:



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

© 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,
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
The Microsoft View: Module 1: Getting Started. Copyright Course 2559B, Introduction to Visual Basic®.NET Programming with Microsoft®.NET. Lecture 1 Microsoft.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Using the Visual Basic Editor Visual Basic for Applications 1.
Introduction to Computing and Programming
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
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.
Chapter 1 Introduction to Programming and C# Programming in C#.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
Beginning Programming with the Visual Studio.NET Environment.
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.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
A First Program Using C#
Visual Basic Chapter 1 Mr. Wangler.
1 Introduction to.NET Framework. 2.NETFramework Internet COM+ Orchestration Orchestration Windows.NET Enterprise ServersBuildingBlockServices Visual Studio.NET.
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
Using Visual Basic 6.0 to Create Web-Based Database Applications
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
IE 411/511: Visual Programming for Industrial Applications
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 1B Introduction (Tutorial)
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
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.
Introduction to Visual Basic.NET Programming In Visual Basic.NET.
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.
Lecture Set 2 Part B – Configuring Visual Studio; Configuration Options and The Help System (scan quickly for future reference)
Lecture Set 1 Part C: Understanding Visual Studio and.NET – Applications, Solutions, Projects (no longer used – embedded in Lecture Set 2A)
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.
Introduction to the Visual Studio.NET IDE (LAB 1 )
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Program Design and Coding
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
Microsoft Visual Basic 2010 CHAPTER THREE Program Design and Coding.
Introduction In The Name Of Allah, The Beneficent, The Merciful.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
Chapter 2 Part C – More on the Help System and The Object Browser (scan quickly for future reference)
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 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 5.1 Test-Driving the Inventory Application.
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.
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.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 3 Building an Application in the Visual Basic.NET Environment.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
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.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
 2007 Pearson Education, Inc. All rights reserved Introduction to the Visual Basic Express 2005 IDE.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 12 Creating Console Applications, Understanding XML, and Creating Web Services.
Chapter 2: The Visual Studio .NET Development Environment
Chapter 1: An Introduction to Visual Basic 2015
1. Introduction to Visual Basic
Web Development in Microsoft Visual Studio 2013
Social Media And Global Computing Introduction to Visual Studio
Understanding the Visual IDE
CIS16 Application Development Programming with Visual Basic
Presentation transcript:

Creating a Console Application with Visual Studio Chapter 2 Creating a Console Application with Visual Studio

Class 2: Visual Studio Visual Studio IDE Create and Compile a Visual Basic project Creating Application Comments My object

Introduction to Visual Studio Visual Studio simplifies the process of creating, compiling, and testing applications Visual Studio can create applications in Visual C++, C#, J#, and Visual Basic The same development environment is used regardless of the programming language

Visual Studio IDE Visual Studio IDE (integrated development environment) The interface is similar to the interface of other applications It has menus, toolbars, a status bar, and windows with which you develop applications Figure 2-1: The Visual Studio IDE

Configuring Visual Studio and Help System Options dialog box Help System Note: Options Dialog Box may appear different from the textbook depending upon the versions and service packs. Yet, the same functions can be found somewhere in the options. I don’t know the incentives of Microsoft engineers who changes those settings. Therefore, I will not go over the details of options and help system as it appears to be impossible to accommodate all the versions. However, the Visual Studio should be configured correctly before creating any applications, and help functions are extremely useful when you encounter a new class or new methods.

Object Browser The Object Browser is used to examine the types that make up the .NET Framework class library and the types in developer-created applications The Object Browser has a drill-down interface The Object Browser is another kind of help, yet very helpful. When you want to use a method from library class, this will tell you the syntax.

Figure 2-22: Object Browser – My Solution Component Selected Do not close object browser using the X mark at the top right corner, it will close the Visual Studio itself. The Object Browser is a tabbed page in the main screen.

Types of Visual Studio Applications Templates are used to create different types of applications The supported templates vary based on the installed Visual Studio edition Common templates Console Application project Windows Application project Class Library project ASP.NET Web Application project Web Service project

Introduction to Visual Studio Solutions and Projects A solution is the heart of an application A solution contains several folders that define an application’s structure Solution files have a file suffix of .sln A solution contains one or more projects The project file is used to create an executable application A project file has a suffix of .vbproj Project properties are set using the project's property pages

Figure 2-26: Project Property Page – Application tab Project Characteristics A project contains one or more namespaces Every project has one root namespace Every project has a type (Console, Windows, etc.) Every project has an entry point A Sub procedure named Main or a form Forms apply only to Windows Application projects Project References A project has references to .NET Framework class library namespaces .NET automatically adds references to commonly used namespaces based on the type of project template Use the References tab of the project property page to add additional namespace references

Creating a New Solution Click File, New Project to display the New Project dialog box Specify the project template and the project file name Different templates appear based on the installed Visual Studio edition

Figure 2-28: New Project Dialog Box

Saving a Visual Studio Project Click File, Save All to save the solution the first time Specify the solution name and the folder where the solution will be created By default, a new folder is created for a new solution Organization of a Visual Studio Solution The Solution Explorer is used to manage the elements of a solution The folder named My Project contains configuration information common to all projects The file AssemblyInfo.vb contains assembly metadata The References folder contains references to other assemblies The bin folder contains the executable file produced as a result of compiling the application A project contains one or more modules

Document Windows Document windows are used to edit the files that make up a solution The Windows Forms Designer is used to create a form’s visual interface The Code Editor is used to create an application’s code Other document windows exist Document windows appear on group tabs Each tab is used to edit a particular document

Figure 2-34: The Code Editor

Code Editor Features The Code Editor checks syntax as statements are entered Statements with syntax errors appear underlined Syntax errors also appear in the Error List window The Code Editor automatically indents statement blocks

Using Intellisense with the Code Editor Intellisense technology displays pop-up menus as statements are entered Intellisense displays classes applicable to a namespace Intellisense displays members of a class or other type Intellisense displays arguments to functions or methods

Figure 2-35: Intellisense Pop-up Menu

Figure 2-37: Code Editor and Error List Window Displaying Syntax Errors

Compiling and Executing a Visual Studio Project Clicking Build ProjectName compiles a project ProjectName is a placeholder for the actual project name Visual Studio calls the same compiler you called directly in Chapter 1 Project configuration options are used to set the compiler options Compiler output appears in the Output window

Executing a Visual Studio Project Pressing F5 builds and runs a project Clicking Debug, Start Debugging builds and runs a project Console Application output appears in a Command Prompt window

Creating Application Comments Comments document an application’s code Comments are ignored by Visual Studio Comments begin with an apostrophe (') Comments can appear alone on a line Comments can appear at the end of a statement These comments must appear at the end of a line Comments cannot break up a continuation line White space lines do not need a comment character

Comments (Best Practices) Create comments when developing or modifying an application Create a comment block at the beginning of a class or module to describe its purpose Create comment blocks for procedures Don’t overuse or create unnecessary comments

the My Object The My object simplifies programming My.Application gets information about the current application My.Computer gets information about the computer My.Computer.Network gets information about the network My.User gets information about the current user

The My.Application Object My.Application.Info has properties to get information about project attributes Description CompanyName ProductName Copyright Trademark Version

The My.Computer Object My.Computer.Info has properties to get information about the computer AvailablePhysicalMemory AvailableVirtualMemory TotalPhysicalMemory TotalVirtualMemory OSFullName OSPlatform OSVersion