Bài giảng Lập trình trên Windows với Microsoft® .NET - Bài 7 - Trần Bá Nhiệm

Sử dụng controls trong C#

Dialog Types

Types of Dialog (by definition)

•OpenFileDialog

•PageSetUpDialog

•FontDialog

•ColorDialog

•SaveFileDialog

•PrintPreviewDialog

•PrintDialog

pdf 19 trang phuongnguyen 7960
Bạn đang xem tài liệu "Bài giảng Lập trình trên Windows với Microsoft® .NET - Bài 7 - Trần Bá Nhiệm", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

Tóm tắt nội dung tài liệu: Bài giảng Lập trình trên Windows với Microsoft® .NET - Bài 7 - Trần Bá Nhiệm

Bài giảng Lập trình trên Windows với Microsoft® .NET - Bài 7 - Trần Bá Nhiệm
Lập trình trên Windows 
 với Microsoft® .NET
 Giảng viên: ThS. Trần Bá Nhiệm
Sử dụng controls trong C#
 Printing Support Controls
 .PrintDocument
 .PrintPreviewControl
Sử dụng controls trong C#
 PrintPreviewControl
 PROPERTIES
 AutoZoom
 Document
 Zoom
 Columns
 UseAntiAlias
 Rows
 StartPage
 InvalidatePreview
Sử dụng controls trong C#
 Dialog Boxes
 To display information and messages for 
 Uses the user
 As a means of accepting user-input 
 Types (by Presentation)
Sử dụng controls trong C#
 Dialog Types
 .Types of Dialog (by definition)
 Custom dialog boxes •OpenFileDialog
 •PageSetUpDialog
 •FontDialog
 •ColorDialog
 Common dialog boxes •SaveFileDialog
 •PrintPreviewDialog
 •PrintDialog
Sử dụng controls trong C#
 OpenFileDialog
 PROPERTIES
 Filter
 MutiSelect
 ShowReadOnly
ReadOnlyChecked FileName
 ShowHelp RestoreDirectory
 InitialDirectory
 FileNames
 CheckFileExists
DefaultExt
Sử dụng controls trong C#
 FontDialog
 PROPERTIES
 AllowVectorFonts
 ShowColor
 ShowEffects AllowVerticalFonts
 MinSize MaxSize
 ShowHelp Color
 Font
Sử dụng controls trong C#
 ColorDialog
 PROPERTIES
 AllFullOpen
 AnyColor
 Color
 SolidColorOnly ShowHelp
 CustonColors FullOpen
Sử dụng controls trong C#
 SaveFileDialog
 PROPERTIES
 CreatePrompt
 OverwritePrompt
 OpenFile
Sử dụng controls trong C#
 MessageBox [1]
 . MessageBox
 Mã chương trình hiển thị Messagebox:
 MessageBox.Show(“[Message]”);
 . Phương thức MessageBox cho phép 
 overloaded với mười hai cách khác nhau để cung 
 cấp nhiều chức năng
Sử dụng controls trong C#
 MessageBox [2]
 •MessageBoxButtons
 •MessageBoxIcon
 •MessageBoxOptions
 •MessageBoxDefaultButton
Sử dụng controls trong C#
 MessageBoxButton
 Member Name
 AbortRetryIgnore
 OK
 OKCancel 
 RetryCancel 
 YesNo 
 YesNoCancel 
Sử dụng controls trong C#
 MessageBoxIcon
 Member Name Member Name
 Asterisk Question
 Error Stop
 Exclamation Warning 
 Hand 
 Information 
 None 
Sử dụng controls trong C#
 MessageBoxOptions
 Member Name
 DefaultDesktopOnly
 RightAlign
 RtlReading
 ServiceNotification 
Sử dụng controls trong C#
 MessageBoxDefaultButton
 Member Name
 Button1
 Button2
 Button3
Sử dụng controls trong C#
 Visual Effects in WinForms
 .Transparent Forms
 .Control Docking
 .Control Anchoring
 .Visual Inheritance
Sử dụng controls trong C#
 Transparent Forms
 this.Opacity = 0.83;
Sử dụng controls trong C#
 Control Anchoring
Control Control not 
Anchored Anchored
Sử dụng controls trong C#
 Visual Inheritance
 Creates a base Form
 Used at various places
 Allows changes to be made in the 
 inherited form

File đính kèm:

  • pdfbai_giang_lap_trinh_tren_windows_voi_microsoft_net_bai_7_tra.pdf