Microsoft Visual Studio

Slides:



Advertisements
Similar presentations
Creating a Dialog-Based Comet Windows Program Brian Levantine.
Advertisements

Copyright  Oracle Corporation, All rights reserved. 1 Creating an Application: The AppBuilder for Java IDE.
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.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Creating a Console Application with Visual Studio
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Introduction to VB.NET Tonga Institute of Higher Education.
6 Copyright © 2004, Oracle. All rights reserved. Working with Data Blocks and Frames.
XP New Perspectives on Introducing Microsoft Office XP Tutorial 1 1 Introducing Microsoft Office XP Tutorial 1.
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.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 2 - Welcome Application: Introduction to C++
Using Visual Studio 2013 An Integrated Development Environment (IDE)
IE 411/511: Visual Programming for Industrial Applications
Lecture Set 1 Part C: Understanding Visual Studio and.NET – Applications, Solutions, Projects (no longer used – embedded in Lecture Set 2A)
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.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
Active-HDL Interfaces Debugging C Code Course 10.
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 )
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.
Programming with Visual Studio.NET A short review of the process.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
Chapter 5 Using a Template to Create a Resume and Sharing a Finished Document Microsoft Word 2013.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Fundamentals of Windows Mouse n 4 Basic Operations: –Pointing –Clicking –Double Clicking –Dragging.
Dive Into® Visual Basic 2010 Express
Chapter 14 Windows Programming with the Microsoft Foundation Classes
Working with Data Blocks and Frames
Chapter 2: The Visual Studio .NET Development Environment
Getting Started with Application Software
INF230 Basics in C# Programming
Working in the Forms Developer Environment
Practical Office 2007 Chapter 10
Chapter 2 – Introduction to the Visual Studio .NET IDE
3.01 Apply Controls Associated With Visual Studio Form
1. Introduction to Visual Basic
3.01 Apply Controls Associated With Visual Studio Form
Visual studio 2010 SENG 403, Tutorial 2 SENG Winter 2011.
Introduction to the Visual C# 2005 Express Edition IDE
Microsoft Word 2003 Illustrated Complete
Using Visual Studio with C#
Web Development in Microsoft Visual Studio 2013
Chapter 2 Adding Web Pages, Links, and Images
Chapter 2 – Introduction to the Visual Studio .NET IDE
CIS16 Application Development Programming with Visual Basic
Microsoft Windows 7 Basics
1. Open Visual Studio 2008.
Using JDeveloper.
Lab 1 Introduction to C++.
Microsoft PowerPoint 2007 – Unit 2
Dreamweaver MX 2004 Fundamentals
Visual Studio.
Our Environment We will exercise on Microsoft Visual C++ v.6
Accessing Databases with ADO.NET, Handling Exceptions, and Printing
Double click Microsoft Visual Studio 2010 on the Computer Desktop
Microsoft Office Illustrated Fundamentals
Microsoft Excel 2007 – Level 2
Presentation transcript:

Microsoft Visual Studio Microsoft Visual Studio: An Integrated Windows Program Development Environment Microsoft Visual Studio • Self-contained environment for Windows program development: – Creating/editing – Compiling/linking (building) – Testing/debugging • IDE that accompanies Visual C++, Visual Basic, Visual C#, and other Microsoft Windows programming languages • See Chapter 2 & Appendix C of the Deitel text • Also Appendix C of the Gregory text

Some Visual Studio Components • The Editors: C, C++, C#, VB source program text editors • cut/paste, color cues, indentation • generate source text files Resource Editors • Resources: Windows static data • Determine look and feel of an application - icons, bitmaps, cursors, menus, dialog boxes, etc. • graphical • generate resource script (.rc) files • integrated with text editor • created visually .NET Language Compilers • Unmanaged Code C/C++ Compiler - translates source programs to machine language - generates object (.obj) files for linker • Managed Code .NET Language Compilers - Many of them � multi-language interoperability - Translate source programs to MSIL - Generate a “Portable Executable” that must be translated to target machine language by the CLR • Resource Compiler - Reads .rc file - Generates binary resource (.res) file for linker

The Linker • Reads compiler .obj and .res files • Accesses C/C++/Windows libraries • Generates executable (.exe or .dll)

Program Build and Run in the .NET Framework Common Language Runtime The Debugger • Powerful source code debugger • Integrated with all parts of Visual Studio • Features - breakpoints - tracing through/over functions - variable watch windows • See Appendix C of Deitel text book

The Wizards Help • AppWizard • ClassWizard - Windows code generator for Windows apps - automatically creates working program templates & skeleton code • ClassWizard - facilitates easy extension of AppWizard- generated classes - creation of new classes - used to tailor AppWizard-generated MFC & .NET skeletons - Accessible in the Properties Window in .NET Help • Essential when developing Windows apps • Hover over key words in edit window and a one-line help message appears • ‘Help’ Menu Item - ‘Dynamic Help ’ - context sensitive • Click on text in edit window and corresponding topic appears in help window • Click on topic in help window to get help - ‘Contents’: Select a topic - ‘Search’: Enter a topic - ‘Index’: Enter/choose a topic

• Go to: http://msdn.microsoft.com MSDN Library (on Web) • Go to: http://msdn.microsoft.com - Search MSDN for desired topic - Some examples: • Windows API reference • MFC reference • Windows forms class library Using Visual Studio • To prepare many kinds of applications - Win32 Console Applications (DOS programs) - Win32 API Apps in C or VC++ - MFC Apps in VC++ - DLLs - .NET Windows Forms Apps in Managed C#, VB, VC++, and other languages - ASP.NET Web Apps and Services - ADO.NET Data Base Apps - Others

Visual Studio Layout • Menu Bar • Several Tool Bars • View Windows (to the side) - Solution Explorer - Class View - Resource View - Properties Window • Working Area (main window) - Text Editor to enter/modify source code - Resource Editors - Tab between different work areas • Output Window & Status Bar (bottom). - System Messages (errors) • Windows can be moved around, docked and undocked

- ‘Index’ | ‘Keyboard Shortcuts’ | ‘Predefined’ Toolbars • Contain Icons--instant routes to main menu functions • May not be visible • If not, right click on any visible toolbar • Brings up following popup window • Can activate a toolbar by clicking on its check box Keyboard Shortcuts • All Menu/Toolbar selections are available from the keyboard using key combinations • Can be faster • More information in Online Help - ‘Index’ | ‘Keyboard Shortcuts’ | ‘Predefined’

Solutions and Projects - A single application - Can contain one or more projects • In Managed applications, projects can be in different languages - Overall solution information stored in a .SLN file - Open this when you want to work on a solution • Project - Basic component of an application - Collection of files: • Source, headers, resources, settings, configuration information, many more Important Visual Studio Generated Files • .sln Solution • .vcproj Project • .c, .cpp, .cs C/C++/C# Windows App source code • .h C/C++ header • .rc Resource script • .res Compiled resource • .ico Icon • .bmp Bitmap image • .exe Executable program • .dll Dynamic Link Library • .aspx ASP.NET Web Form source code • .asmx ASP.NET Web Service source code

Program Configurations Temporary Visual Studio Generated Files • Many are very big and can (should) be removed! • .obj Compiler machine code translation • .ilk Incremental link file • .pch Precompiled header (huge!) • .pdb Precompiled debugging info • .idb Incremental debug info • .ncb intellisense database (huge!) • .aps Supports viewing resources • Others • Can be deleted Program Configurations • Debug - appends debugging information - produces more and larger files • Release - no debugging information - optimized for size, performance, & efficiency

Setting the Configuration • Click ‘Build’ on Main Menu • Choose ‘Configuration Manager’ • Choose desired configuration (‘Debug’ or ‘Release’) in Configuration Manager’s ‘Active Solution Configuration Box’ • Default is ‘Debug’ Creating a Win32 API Windows Application with Visual Studio • Startup - Click ‘Start’ on Task Bar - ‘All Programs’ - ‘Microsoft Visual Studio 2008’ | ‘Microsoft Visual Studio 2008’ • Creating a new Win32 API solution - ‘File’ | ‘New’ | ‘Project’ from Menu Bar - In ‘New Project’ box, select ‘Visual C++’ ‘Win32’ from ‘Project Types:’ & click on ‘Win32 Project’ in ‘Templates’ - Set the ‘Location’ to a convenient directory & name the project (e.g. win32app1) - ‘OK’

• Click ‘Application Settings’ in resulting ‘Win32 Application Wizard’ Box - Select ‘Windows Application’ from ‘Application Type’ radio buttons - Select ‘Empty Project’ from ‘Additional Options’ check boxes - Click ‘Finish’ • Inserting source files into project: - Open a new C++ file & type or copy/paste the code into the program: • ‘File ’ | ‘New’ | ‘File’ from menu • Choose ‘Visual C++’ from ‘Categories’, C++ file (.cpp) from ‘Installed Templates’, & click ‘Open’ • Type or paste source code into the resulting Edit window • Save the file in the project’s subdirectory as a C++ source file, giving it an appropriate name (e.g., win32app1) - Add the source file to the project: • Choose ‘Project’ | ‘Add Existing Item’ from menu • Click on the file you saved (e.g. win32app1.cpp) • Confirm that it was added to the project by expanding ‘Source Files’ in the Solution Explorer Window - If Solution Explorer is not visible, select ‘View - Solution Explorer’ from the menu

• Building the Solution: • Alternative Way of Adding a Source File to a Project: - You can also copy an existing source code file into the project’s subdirectory - Then as before: • Choose ‘Project’ | ‘Add Existing Item’ from the menu • Select the .cpp file & click ‘Open’ - Should appear in Solution Explorer window - Open it by double clicking on it • Building the Solution: - ‘Build’ | ‘Build Solution’ from menu - Project will be compiled/linked - Messages/errors will appear in Output Window • Running the Program: - ‘Debug’ | ‘Start’ from menu • Shortcut key: F5 - Or ‘Debug’ | ‘Start Without Debugging’ from menu • Shortcut key: Ctrl-F5

• Command Line Compilers: Compiling from Command Line • Command Line Compilers: - C++: CL.EXE - C# : CSC.EXE - Visual Basic: VBC.EXE • All are run from a DOS session, but directory paths must be set correctly • Easiest to start a Visual Studio 2008 Command Prompt (paths already set) - From Task Bar: • Start | All Programs | Microsoft Visual Studio 2008 | Visual Studio Tools | Visual Studio 2008 Command Prompt Command Line Compiling, continued • To compile our first Visual C++, Win32 API application (win32a1.cpp) from the command line: - cl kernel32.lib user32.lib gdi32.lib win32a1.cc - Note that any required libraries (DLLs) must be specified • There are many compiler options: - See Online Help: - ‘Index’ | ‘cl.exe compiler’ | ‘building programs’ - For C#: ‘Index’ | ‘csc.exe’ • We won’t be using command line compilers much in this course, but they’re there if you need them

• Exiting Developer Studio: • Cleanup: - Copy solution, project, source, header, resource files to disk - Copy .exe file from project's Debug directory - Best: Delete all temporary files & copy entire solution (project directory) to floppy or CD - Delete project directory from hard drive • Exiting Developer Studio: - ‘File’ | ‘Exit’ from menu