1. Trang chủ
  2. » Công Nghệ Thông Tin

Bài giảng lập trình ứng dụng visualbasic bài 4 phạm đình sắc

12 353 0

Đ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

Thông tin cơ bản

Định dạng
Số trang 12
Dung lượng 396,19 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Properties: các thành phần của ToolStrip phần của ToolStrip theo chiều ngang Horizontal, dọc theo chiều kim đồng hồ Vertical90, Vertical270… chiều ngang Horizontal, dọc Vertical… thường

Trang 1

Windows Form programming with VB.Net 2005. 1

™ToolStrip

™ Từ Visual Studio 2005 gọi ToolBar là ToolStrip

Trang 2

Windows Form programming with VB.Net 2005. 3

™ToolStrip

1 Properties:

các thành phần của ToolStrip

phần của ToolStrip theo chiều ngang (Horizontal), dọc theo chiều kim đồng hồ (Vertical90, Vertical270)…

chiều ngang (Horizontal), dọc (Vertical)…

thường là:

- ToolStripDropDownButton, ToolStripSplitButton

Trang 3

Windows Form programming with VB.Net 2005. 5

1 Properties:

- Text: Nội dung của Item

- TextAlign: Căn lề cho Text so với ToolstripItem

- TextDirection: Text theo chiều ngang or dọc

- TextImageRelation: Quan hệ giữa Text và Image (chồng ghép, trên, dưới, trước, sau)

Overlay

ImageAboveText

TextAboveImage

ImageBeforeText

TextBeforeImage

Overlay

ImageAboveText TextAboveImage ImageBeforeText

TextBeforeImage

Trang 4

Windows Form programming with VB.Net 2005. 7

1 Properties:

- Image: image hiển thị

- ImageAlign: Căn lề cho image so với Toolstrip

- ImageTransparent: làm trong suốt màu of image

- DisplayStyle: None, Text, Image, ImageAndText

- Alignment: Định vị trái hay phải của 1 Item bên trái hay phải trên Toolstrip

Trang 5

Windows Form programming with VB.Net 2005. 9

1 Properties:

- Dock: định dạng hiển thị cho Toolstripcontainer

- LeftToolStripPanelVisible: True or False

- RightToolStripPanelVisible: True or False

- TopToolStripPanelVisible: True or False

- BottomToolStripPanelVisible: True or False

™ StatusStrip

1 Properties:

các thành phần của StatusStrip

phần của StatusStrip theo chiều ngang (Horizontal), dọc theo chiều kim đồng hồ (Vertical90, Vertical270)…

chuều ngang (Horizontal), dọc (Vertical)…

Trang 6

Windows Form programming with VB.Net 2005. 11

thường là:

- ToolStripDropDownButton, ToolStripSplitButton

StatusStrip: Chủ yếu và thường dùng là

ToolStripStatusLabel

™ MenuStrip

1 Properties:

các thành phần của MenuStrip

phần của MenuStrip theo chiều ngang (Horizontal), dọc theo chiều kim đồng hồ (Vertical90, Vertical270)…

chuều ngang (Horizontal), dọc (Vertical)…

Trang 7

Windows Form programming with VB.Net 2005. 13

1 Properties:

- Text: Nội dung của Item

- TextAlign: Căn lề cho Text so với Toolstrip

- TextDirection: Text theo chiều ngang or dọc

- TextImageRelation: Quan hệ giữa Text và Image (trên, dưới, trước, sau, chồng ghép)

- Image: image hiển thị

- ImageAlign: Căn lề cho image so với Toolstrip

- ImageTransparent: làm trong suốt màu of image

- DisplayStyle: None, Text, Image, ImageAndText

- Alignment: Định vị trái hay phải của 1 Item bên trái hay phải trên Toolstrip

1 Properties:

dưới, trước, sau, chồng ghép)

phải trên ToolstripMenuItem

Trang 8

Windows Form programming with VB.Net 2005. 15

viết code cho MenuStrip ToolStripMenuItem ở đây thường là:

- ToolStripComboBox

- ToolStripTextBox

- ToolStripSeparator

cây thư mục

ToolStripItem Container Support

Strip

Menu Strip

Status Strip

Trang 9

Windows Form programming with VB.Net 2005. 17

1 Properties

Checked của ToolStripMenuItem (True or False)

ToolStripMenuItem VD: Ctrl+N …

Ctrl+Shift+N

2 Event:

™ ContextMenuStrip

up menu” thường cung cấp cho User thực hiện

trên Windows form

ContextMenuStrip khi đối tượng đó được gán (Set) bằng một ContextMenuStrip được tạo và

Trang 10

Windows Form programming with VB.Net 2005. 19

System Tray (StaskBar)

- NottifyIcon liên quan đến trạng thái của Window Form: theo đối tượng WindowState bao gồm:

FormWindowState Normal

FormWindowState Minimized

1 Properties:

- Icon: Icon hiển thị ở TaskBar

- ContextMenuStrip: Set ContextMenuStrip cho NotifyIcon

- MaskedTextBox & RichTextBox: có tất cả các Properties và Event như một TextBox và có đặc điểm riên sau:

- RichTextBox: tương đương một TextBox ở dạng MultiLine=True

- MaskedTextBox: có Properties (thuộc tính) Mask cho phép định dạng cách thức hiển thị và nhập thông tin vào theo một định dạng đã được định sẵn

ví dụ như ngày tháng, Giờ, số, chuỗi… / / _ ; 061-3876543

Trang 12

Windows Form programming with VB.Net 2005. 23

0 Chỉ đư được nhập vào số, nếu không nhập vào sẽ nhận khoảng trắng

9 nhập số hoặc khoảng trắng

# Digit or space, optional If this position is blank in the mask, it will be

rendered as a space in the text property Plus (+) and minus (-)

signs are allowed.

L Letter, required Restricts input to the ASCII letters a-z and A-Z This mask element is equivalent to [a-zA-Z] in regular expressions

? Letter, optional Restricts input to the ASCII letters a-z and A-Z This mask element is equivalent to [a-zA-Z]? in regular expressions

& Character, required If the AsciiOnly property is set to true, this

element behaves like the "L" element

C Character, optional Any non-control character If the AsciiOnly property is set to true, this element behaves like the "?" element.

A Alphanumeric, optional If the AsciiOnly property is set to true, the

only characters it will accept are the ASCII letters a-z and A-Z.

a Alphanumeric, optional If the AsciiOnly property is set to true, the

only characters it will accept are the ASCII letters a-z and A-Z.

™element MaskedTextBox Format Description

. Decimal placeholder The actual display character used will be the decimal placeholder appropriate to the format provider, as determined

by the control's FormatProvider property.

, Thousands placeholder The actual display character used will be the thousands placeholder appropriate to the format provider, as

determined by the control's FormatProvider property.

: Time separator The actual display character used will be the time placeholder appropriate to the format provider, as determined by the

control's FormatProvider property.

/ Date separator The actual display character used will be the date placeholder appropriate to the format provider, as determined by the

control's FormatProvider property.

$ Currency symbol The actual character displayed will be the currency symbol appropriate to the format provider, as determined by the

control's FormatProvider property.

< Shift down Converts all characters that follow to lowercase

> Shift up Converts all characters that follow to uppercase.

| Disable a previous shift up or shift down.

\ Escape Escapes a mask character, turning it into a literal "\\" is the escape sequence for a backslash

Ngày đăng: 03/12/2015, 18:16

TỪ KHÓA LIÊN QUAN

w