Lecture Windows programming: Chapter 3(2) - Châu Thị Bảo Hà

Chapter 3 (Cont’d) introduction to the Windows programming. In this chapter present the some common controls as: Button; label, LinkLabel; TextBox ( + ErrorProvider component), RichTextBox; GroupBox, panel; CheckBox, RadioButton; PictureBox, ImageList;. Inviting you to refer. | Chapter 3 Windows Programming Cont’d 1 Contents Introduction to Windows Form Application Introduction to Form Introduction to Control Events Some common Controls Some advanced Controls Slide 2 Naming rules Each control has an identifier (Name property) can contain letters, digits, and underscores (_) cannot start with digits can start with the @ symbol no spaces or punctuation marks If multiple words capitalize 1st letter of each word 3 letter lowercase prefix identifies control type Button - btn Label - lbl Form - frm Slide 3 Recommended naming Object Class Prefix Example Form frm frmDataEntry Button btn btnExit TextBox txt txtPaymentAmount Label lbl lblTotal RadioButton rad radBold CheckBox chk chkPrintSummary PictureBox pic picLandscape ComboBox cbo cboBookList ListBox lst lstIndegredients GroupBox grb grbColor Slide 4 Some common Controls Button Label, LinkLabel TextBox ( + ErrorProvider component), RichTextBox GroupBox, Panel CheckBox, RadioButton PictureBox, ImageList ListBox, CheckedListBox ComboBox TabControl Slide 5 Button () Allows the user to click it to perform an action some properties: FlatStyle Image ImageAlign Text TextAlign default event: Click event: happens whenever a user clicks the button Try it out – Working with Button () Slide 6 Label () To display text or images that cannot be edited by the user some properties: AutoSize BorderStyle Font Image ImageAlign Text TextAlign Slide 7 LinkLabel () To add Web-style links to applications some properties: ActiveLinkColor LinkArea LinkColor LinkVisited VisitedLinkColor Slide 8 TextBox () To enter text or display information some properties: CausesValidation: true/false CharacterCasing: Normal/Upper/Lower MaxLength Multiline: true/false PasswordChar ReadOnly: true/false ScrollBars WordWrap: true/false Slide 9 CausesValidation: là true sẽ cho phép phát sinh 2 sự kiện Validating and Validated để kiểm tra dữ liệu CharacterCasing: thay đổi thành chữ hoa, chữ thường trong ô nhập . | Chapter 3 Windows Programming Cont’d 1 Contents Introduction to Windows Form Application Introduction to Form Introduction to Control Events Some common Controls Some advanced Controls Slide 2 Naming rules Each control has an identifier (Name property) can contain letters, digits, and underscores (_) cannot start with digits can start with the @ symbol no spaces or punctuation marks If multiple words capitalize 1st letter of each word 3 letter lowercase prefix identifies control type Button - btn Label - lbl Form - frm Slide 3 Recommended naming Object Class Prefix Example Form frm frmDataEntry Button btn btnExit TextBox txt txtPaymentAmount Label lbl lblTotal RadioButton rad radBold CheckBox chk chkPrintSummary PictureBox pic picLandscape ComboBox cbo cboBookList ListBox lst lstIndegredients GroupBox grb grbColor Slide 4 Some common Controls Button Label, LinkLabel TextBox ( + ErrorProvider component), RichTextBox GroupBox, Panel CheckBox, RadioButton PictureBox, ImageList ListBox,

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.