Su dung microsoft visual studio 2008

37 320 0
Su dung microsoft visual studio 2008

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Windows SVS 2008

Copyright © Wondershare Software - Nguyễn Minh Đạo Copyright © Wondershare Software Copyright © Wondershare Software • 1. Khởi động – Bước 1: Khởi động Visual Studio 2008 – Bước 2: Vào menu File | New | Project – Bước 3: Khai báo • Khung Project types : chọn Visual C# • Khung Templates : chọn Windows Form Application • Khung Name: Nhập tên HelloWorld • Khung Location : chọn ổ đĩa C:\ – Click OK. Copyright © Wondershare Software Copyright © Wondershare Software Copyright © Wondershare Software Copyright © Wondershare Software • a. Thêm một Form mới vào Project: – Bước1: Vào menu Project | Add New Item … Hoặc chọn công cụ Add New Item trên thanh Standard – Bước 2: Khai báo • + Categories: chọn Windows Forms • + Templates: chọn Windows Form • + Name: đặt tên Form – Bước 3: Nhắp Add Copyright © Wondershare Software • b. Thêm một Form có sẵn vào Project: – Bước 1. Vào menu Project | Add Existing Item … – Bước 2. Chọn Form. Nhập tên form cần thêm – Bước 3. Nhắp Add • c. Xóa bỏ một Form đang có trong Project: – Bước 1. Chọn Form cần gỡ bỏ (ở cửa sổ Solution Explorer) – Bước 2. Vào menu Edit | Delete • d. Lưu Form – Vào menu File | Save Form.cs hoặc Ctrl + S Copyright © Wondershare Software • Bước 1: Thiết kế giao diện – Dựa theo bài toán chọn lựa các Windows Controls thích hợp. – Đặt các thuộc tính cho các Windows Controls. • Bước 2: Viết lệnh – Xác định các công việc cần thực hiện  chọn các sự kiện thích hợp trên các Windows Controls. – Viết các phương thức đáp ứng các sự kiện trên. Copyright © Wondershare Software • Các Windows Controls : – Control là lớp (class) các thành phần được thêm vào Windows Forms để tương tác giữa người sử dụng với Windows. – Có rất nhiều loại control trong Windows Forms như: Label, TextBox, ListBox, ComboBox, Button, … – Các control sử dụng trên Windows Forms dùng namespace System.Windows.Forms. [...]...• Các thuộc tính (Properties) – Properties là những thông tin mà ta có thể thay đổi nội dung, cách trình bày … của người thiết kế để ứng dụng vào control – Mỗi lớp (class) có nhiều property khác nhau Tuy nhiên, vẫn có một số property giống nhau được xây dựng từ lớp ban đầu Copyright © Wondershare... Software Copyright © Wondershare Software Copyright © Wondershare Software Copyright © Wondershare Software Copyright © Wondershare Software Copyright © Wondershare Software • Các thuộc tính chung : – Font= Microsoft Sans Serif”;Size=“12”;Bold=True • Form: – Name=“FrmDangNhap”;Text=“Form Đăng Nhập” • Label: – Name=“Label1”; Text=“Tên Đăng Nhập” – Name=“Label2”; Text=“Mật Khẩu” • TextBox: – Name=“txtUser”;... Name=“txtUser”; Text=“” – Name=“txtPass”; Text=“” Copyright © Wondershare Software • CheckBox: – Name=“chkNho”; Text=“Ghi Nhớ” • Button: – Name=“btnDangNhap”; Text=“Đăng Nhập” – Name=“btnXoa”; Text=“Xóa” – Name=“btnDung”; Text=“Dừng” Copyright © Wondershare Software Copyright © Wondershare Software • Nhắp đúp vào button btnDangNhap, thêm đoạn code sau: Copyright © Wondershare Software Copyright © Wondershare Software

Ngày đăng: 09/04/2014, 01:40

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan