19
Lập trình trên Windows với Microsoft® .NET

C# co ban 7

Embed Size (px)

DESCRIPTION

c sharp

Citation preview

Page 1: C# co ban 7

Lập trình trên Windows với Microsoft® .NET

Page 2: C# co ban 7

Sử dụng controls trong C#

PrintDocument

PrintPreviewControl

Printing Support Controls

Page 3: C# co ban 7

Sử dụng controls trong C#

PROPERTIES

Methods

AutoZoom

Columns

Document

Rows StartPage

UseAntiAlias

Zoom

InvalidatePreview

PrintPreviewControl

Page 4: C# co ban 7

Sử dụng controls trong C#

Dialog Boxes

Uses

Types (by Presentation)

To display information and messages for the user

As a means of accepting user-input

Page 5: C# co ban 7

Sử dụng controls trong C#

Dialog Types

Types of Dialog (by definition)

•OpenFileDialog•PageSetUpDialog•FontDialog•ColorDialog•SaveFileDialog•PrintPreviewDialog•PrintDialog

Custom dialog boxes

Common dialog boxes

Page 6: C# co ban 7

Sử dụng controls trong C#

PROPERTIES

CheckFileExists DefaultExt

FileName

FileNames

Filter

InitialDirectory

MutiSelect

ReadOnlyChecked

RestoreDirectory ShowHelp

ShowReadOnly

OpenFileDialog

Page 7: C# co ban 7

Sử dụng controls trong C#

PROPERTIES

AllowVectorFonts

AllowVerticalFonts

Color Font

MaxSize MinSize

ShowColor ShowEffects

ShowHelp

FontDialog

Page 8: C# co ban 7

Sử dụng controls trong C#

AllFullOpen AnyColor

Color

CustonColors FullOpen

ShowHelp SolidColorOnly

PROPERTIES

ColorDialog

Page 9: C# co ban 7

Sử dụng controls trong C#

PROPERTIES

MethodsCreatePrompt

OverwritePrompt

OpenFile

SaveFileDialog

Page 10: C# co ban 7

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

Page 11: C# co ban 7

Sử dụng controls trong C#

MessageBox [2]

•MessageBoxButtons

•MessageBoxIcon

•MessageBoxDefaultButton

•MessageBoxOptions

Page 12: C# co ban 7

Sử dụng controls trong C#

MessageBoxButtonMember Name

AbortRetryIgnore

OK

OKCancel

RetryCancel

YesNo

YesNoCancel

Page 13: C# co ban 7

Sử dụng controls trong C#

MessageBoxIcon

Member Name Member Name

Asterisk Question

Error Stop

Exclamation Warning

Hand

Information

None

Page 14: C# co ban 7

Sử dụng controls trong C#

MessageBoxOptions

Member Name

DefaultDesktopOnly

RightAlign

RtlReading

ServiceNotification

Page 15: C# co ban 7

Sử dụng controls trong C#

MessageBoxDefaultButton

Member Name

Button1

Button2

Button3

Page 16: C# co ban 7

Sử dụng controls trong C#

Visual Effects in WinForms

Transparent Forms

Control Docking

Control Anchoring

Visual Inheritance

Page 17: C# co ban 7

Sử dụng controls trong C#

Transparent Forms

this.Opacity = 0.83;

Page 18: C# co ban 7

Sử dụng controls trong C#

Control Anchoring

Control Anchored

Control not Anchored

Page 19: C# co ban 7

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