üIntroduction to the
Visual Studio 2005
INTRODUCTION
§ Chạy file setup.exe ta được hình minh họa (chú ý cài khá lâu có thể hơn 1 giờ)
3
CÀI ĐẶT Visual Studio.NET 2005
Nhấn
Next
Nhấn Next
Chú ý
6
CÀI ĐẶT Visual Studio.NET 2005
Cài đặt MSDN có thể độc lập hoặc cài sau khi đã cài bộ Visual
Studio 2005
9
CÀI ĐẶT MSDN (Help)
10
11
12
CÀI ĐẶT MSDN (Help)
13
14
Introduction
15
The .NET Framework
16
17
18
Programming Languages
§ Procedural
Ÿ Program specifies exact sequence
§ Event Driven
§ Object Oriented Programming (C#.NET)
Ÿ User controls sequence
Click event
Double Click event
Change event
19
Quá trình biên dịch và chạy một chương trình trên nền
.NET
C# C#
Code Compiler
20
Object Model
INTRODUCTION
23
24
Visual Studio .NET Integrated Development
Environment (IDE) Overview
25
project name
project location
26
§ Toolbars
§ Document Window
§ Form Designer
§ Solution Explorer
§ Properties Window
§ Toolbox
27
Visual Studio .NET Integrated Development
Environment (IDE) Overview
tabs
menu bar
28
Toolbox
toolbox group
scroll arrow
29
toolbar
30
Solution Explorer
Toolbox
Solution Explorer
Properties
31
Solution Explorer
32
Solution Explorer
Startup project
Collapse tree
Expand tree
34
Properties window
Properties Window
Component selection
Characterized icon
Event icon
Alphabet icon
Scroll bar
Current value
Property
Description
36
Using Help
§ Help menu
Ÿ Index
Displays an alphabetic index that users can browse through
Ÿ Search
Allows users to search for a particular help topic
Filters can be use to narrow the search
§ Dynamic help
Ÿ Provide a help topic based on the mouse location
Ÿ Displays relevant topics in the dynamic help window
Ÿ Lists help entries, samples, and “getting started” topics
§ Context-Sensitive help
Ÿ Automatically brings up relevant help topics Slide 37
37
©
Using Help
Dynamic
Help window
38
Fig. 2.13 Dynamic Help window. Slide 38 ©
Naming Rules
39
Recommended Naming Conventions for C#
Objects
Ví Dụ Đặt Tên
lblMessage
btnPush
btnExit
41
Name ? Name ?
Name ?
Name ?
Name ?
42
Simple Program: Displaying Text and
an Image
§ The program
Ÿ Form to hold other controls
Ÿ Label to display text
Ÿ PictureBox to display a picture
Ÿ No code needed to create this program
§ Create the new program
Ÿ Create a new project
Make the project a windows application
Name it: ASimpleProject and sets its location
§ Set the form’s title bar
Ÿ The Text property determines the text in the title bar
43
Ÿ Set the value to: A Simple Program Slide 43 ©
44
Project type
Project name
Click to change
project location
Project location
45
Simple Program: Displaying Text and an
Image
Select project location
46
Selected property
Property value
Property description
47
Title bar
grid
Disabled sizing handle
48
Simple Program: Displaying Text and an
Image
Current color
Custom palette
Down arrow
49
Label
control
50
51
Simple Program: Displaying Text and
an Image
Updated Label
New PictureBox
52
53
End button
Design form
(grid)
Running
application
54
Ví Dụ 2
lblKQua
btnVN
btnClose
btnSpan
btnEng
55
56