chapter 2 the visual studio net development environment
Download
Skip this Video
Download Presentation
Chapter 2: The Visual Studio .NET Development Environment

Loading in 2 Seconds...

play fullscreen
1 / 41

Chapter 2: The Visual Studio .NET Development Environment - PowerPoint PPT Presentation


  • 140 Views
  • Uploaded on

Chapter 2: The Visual Studio .NET Development Environment. Visual Basic .NET Programming: From Problem Analysis to Program Design. Getting Started with VB .NET. Visual Studio .NET can be used for Visual Basic Other programming languages Start application. Go to:

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Chapter 2: The Visual Studio .NET Development Environment' - gavivi


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
chapter 2 the visual studio net development environment

Chapter 2: The VisualStudio .NET DevelopmentEnvironment

Visual Basic .NET Programming:

From Problem Analysis to Program Design

getting started with vb net
Getting Started with VB .NET
  • Visual Studio .NET can be used for
    • Visual Basic
    • Other programming languages
  • Start application. Go to:
    • Start menu -> (All) Programs -> Microsoft Visual Studio .NET -> Microsoft Visual Studio .NET

Visual Basic .NET Programming: From Problem Analysis to Program Design

creating a project using visual basic net
Creating a Project Using Visual Basic .NET
  • Project
    • Collection of files related to a VB .NET application
  • Template:
    • Pattern for creating a specific type of application
  • When creating a new project:
    • Must identify type of project as Visual Basic
    • Identify template (Windows or Console Application)
    • Specify project name and location

Visual Basic .NET Programming: From Problem Analysis to Program Design

understanding how vb net organizes your programs
Understanding How VB .NET Organizes Your Programs
  • Solution Explorer window
    • Shows hierarchical arrangement of items
  • Properties window
    • Contains information about file properties
  • File names:
    • Use .vb extension
    • Named Module1.vb by default

Visual Basic .NET Programming: From Problem Analysis to Program Design

using the text editor
Using the Text Editor
  • Provides standard text-editing capabilities
  • Also provides:
    • Color-coding
    • Code indentation
    • Code completion (IntelliSense feature)
  • Comment
    • Statement included for documentation purposes only; not read by the compiler (computer)
    • Starts with a ‘ (e.g., ‘this is a comment)
  • VB .NET automatically generates some code

Visual Basic .NET Programming: From Problem Analysis to Program Design

using the text editor continued
Using the Text Editor (continued)
  • IntelliSense
    • Helps you complete lines of code by matching words
    • Recognizes partial class and method names
      • Suggests possible matches for name you are typing

Visual Basic .NET Programming: From Problem Analysis to Program Design

displaying line numbers
Displaying Line Numbers
  • Go to Tools (on the menu bar)
    • > Options -> Text Editor folder
    • > Basic Subfolder
      • Click the Line Numbers checkbox
      • Click OK

Visual Basic .NET Programming: From Problem Analysis to Program Design

renaming module1 vb
Renaming Module1.vb
  • Assign descriptive names to programs you write
    • Should rename from default names
  • In the Solution Explorer window, click Module1.vb.
    • File properties of Module1 appear in the Properties window
    • Use Properties window to change name
    • Make sure the module is renamed in the source code

Visual Basic .NET Programming: From Problem Analysis to Program Design

renaming module1 vb cont
Renaming Module1.vb (cont.)

Visual Basic .NET Programming: From Problem Analysis to Program Design

compiling and executing a visual basic net program
Compiling And Executing a Visual Basic .NET Program
  • Select Debug from the menu bar
    • Click Start Without Debugging
    • If there are errors:
      • Message box displayed

Visual Basic .NET Programming: From Problem Analysis to Program Design

using the visual form designer
Using the Visual Form Designer
  • Windows application
    • Runs in Windows environment
  • Visual form editor:
    • Windows Form Designer
    • Can select icons representing various components
    • Place and arrange components on window
    • Code is automatically written to match visual form

Visual Basic .NET Programming: From Problem Analysis to Program Design

creating a windows application
Creating a Windows Application
  • Use Windows Application template
  • Use Layout toolbar
    • To control appearance and position of components
  • The form’s grid
    • Helps layout components
    • Not visible when application runs

Visual Basic .NET Programming: From Problem Analysis to Program Design

customizing the appearance of a form
Customizing the Appearance of a Form
  • Handle
    • Use to resize objects
    • Pointer changes to double arrow
    • Resize form by clicking and dragging handle
  • Modifiable form elements:
    • Size
    • Background color
    • Title
    • Name
    • Position

Visual Basic .NET Programming: From Problem Analysis to Program Design

slide24
The Text property does not change the name of the form. The Name property does.

Visual Basic .NET Programming: From Problem Analysis to Program Design

adding components to a form
Adding Components to a Form
  • Use Toolbox
    • Hidden window on left side of main window
    • Double-click toolbox items to add to form or drag them to the form
  • When adding buttons
    • Must identify action that will take place when button pressed
    • Once the button is placed on the form, double-click the button to reveal the code for it

Visual Basic .NET Programming: From Problem Analysis to Program Design

adding form components cont
Adding Form Components (cont.)
  • Drag and drop a LABEL from the Toolbox to the form
  • Rename it from the Properties window

(see next PPT slide)

Visual Basic .NET Programming: From Problem Analysis to Program Design

slide31
Drag and drop a BUTTON
  • Name it; add code

Visual Basic .NET Programming: From Problem Analysis to Program Design

exploring the debugging tool
Exploring the Debugging Tool
  • Debugger
    • Helps you isolate errors
  • Breakpoint
    • Flag that tells debugger to temporarily suspend execution of program at a particular point
    • Can view information about program
      • May help determine source of problem

Visual Basic .NET Programming: From Problem Analysis to Program Design

getting started with the debugger
Getting Started with the Debugger
  • Debugger
    • Intended to help identify errors in program that occur while program is running
    • Cannot help to find coding/syntaxerrors that prevent program from being built successfully

(Review Syntax errors)

    • Helps find logic errors
      • HOWEVER does not fix them for you

Visual Basic .NET Programming: From Problem Analysis to Program Design

setting breakpoints
Setting Breakpoints
  • Position cursor in code window
  • Right-click
    • Select Insert Breakpoint from popup menu
  • Program execution is suspended just before line of code where breakpoint is set
  • Execute program in debug mode

Visual Basic .NET Programming: From Problem Analysis to Program Design

exploring the help facility
Exploring the Help Facility
  • Help features:
    • Search for help on specific item
    • Browse table of contents
    • Scroll through alphabetized index of topics
    • Dynamic help
      • Identifies help topics in response to actions
      • Displays topics depending on currently selected window or item
    • Context-sensitive help

Visual Basic .NET Programming: From Problem Analysis to Program Design

exploring context sensitive help
Exploring Context-Sensitive Help
  • Invoke by pressing F1 key
  • Obtain help on virtually any
    • Keyword
    • Component
    • Window
    • Other element of VB .NET

Visual Basic .NET Programming: From Problem Analysis to Program Design

summary
Summary
  • Visual Studio .NET
    • Set of software tools that helps you code, debug, and test a system as you develop it
    • Provides many options that allow you to customize appearance of screen and the tools
    • Uses hierarchical arrangement of solutions and projects to organize programs

Visual Basic .NET Programming: From Problem Analysis to Program Design

summary continued
Summary (continued)
  • The VB .NET text editor
    • Supports color-coding, indentation, and code completion features
  • Compile and execute VB .NET program
    • Using options on Build and Debug menus
  • Visual form editor
    • Visual development tool
    • Generates code from forms

Visual Basic .NET Programming: From Problem Analysis to Program Design

summary continued1
Summary (continued)
  • Debugger
    • Tool that helps identify problems
  • Help facility of VB .NET provides many options for accessing help

Visual Basic .NET Programming: From Problem Analysis to Program Design

ad