Uploaded by Clinton Shwade

JK VB NET 3 VB IDE

advertisement
Chapter 2: The Visual
Studio .NET Development
Environment
Objectives
• Explore the Visual Studio .NET development
environment
• Create a project using Visual Basic .NET
• Compile and execute a Visual Basic .NET
program
• Use the visual form designer
• Explore the debugging tool
• Explore the help facility
2
Exploring the Visual Studio .NET
Development Environment
• Integrated Development Environment (IDE)
– Set of software tools used for programming
• Visual Studio .NET can be used for
– Visual Basic
– Other programming languages
3
Exploring the Microsoft
Development Environment
• MDE includes
– Menu bar
– Various toolbars
– Several windows
• Context-sensitive
– Toolbars are displayed to support the task you are
performing
4
5
Exploring the Microsoft
Development Environment
(continued)
• Hidden windows
– Enable you to keep frequently needed tools
available without cluttering IDE
– Reveal hidden window by moving mouse pointer
over its tab
• Configure environment to match Figure 2-2
6
7
8
Creating a Project Using Visual
Basic .NET
• After creating project using New Project dialog
box, displayed components are:
– Module1.vb document
• VB .NET automatically generates some code
– Solution Explorer window
– Properties window
• Contains information about file properties
9
Understanding How VB .NET
Organizes Your Programs
• Solution Explorer window
– Shows hierarchical arrangement of items
• File names:
– Use .vb extension
– Named Module1.vb by default
10
Understanding How VB .NET
Organizes Your Programs
(continued)
• Solution
– Container for one or more projects
– Must designate startup project
• When solution contains more than one project
• Project that runs first
11
Using the Text Editor
• Provides standard text-editing capabilities
• Also provides:
– Color-coding
– Code indentation
– Code completion
• Comment
– Statement included for documentation purposes
only
12
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
13
14
15
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
16
Customizing the Appearance of
a Form
• Modify form elements:
– Size
– Background color
– Title
– Name
– Position
17
18
19
20
21
Adding Components to a Form
• Use Toolbox
– Hidden window on left side of main window
– Double-click toolbox items to add to form
• When adding buttons
– Must identify action that will take place when
button pressed
22
23
24
Exploring the Debugging Tool
• Debugger
– Helps you isolate errors
25
Getting Started with the
Debugger
• Debugger
– Intended to help identify errors in program that
occur while program is running
– Cannot help to find coding errors that prevent
program from being built successfully
• Syntax errors
– Helps find logic errors
• HOWEVER does not fix them for you
26
Related documents
Download