Admin Admin
Tổng số bài gửi : 34 Join date : 03/07/2010
| Tiêu đề: Msgbox() Sat Jul 10, 2010 5:00 pm | |
| Msgbox()hiện thị một thông báo. MsgBox ( flag, "title", "text" [, timeout [, hwnd]] )- Trong đó:
flag: kiểu title:tiêu đề text: thông báo timeout: thời gian xuất hiện hwnd :handle tới cửa sổ mẹ
một số mã nút: - OK : 1
CANCEL : 2 ABORT : 3 RETRY : 4 IGNORE : 5 YES : 6 NO : 7 TRY AGAIN : 10 CONTINUE : 11
Danh sách Flag: - Kiểu trên msgbox sẽ có các nút sau số hex
0 :OK button 0x0 1 :OK and Cancel 0x1 2 :Abort, Retry, and Ignore 0x2 3 :Yes, No, and Cancel 0x3 4: Yes and No 0x4 5: Retry and Cancel 0x5 6: ** Cancel, Try Again, Continue 0x6
- kiểu trên msgbox sẽ có thêm icon sau
0 :(No icon) 0x0 16: Stop icon (dấu X to đùng) 0x10 32:Question-mark icon (dấu ? cũng to) 0x20 48 :Exclamation-point icon (dấu ! nguy hiểm chết người) 0x30 64 :Information-sign icon (chữ i to ko kém) 0x40
- kiểu nút đc mặc định
0: nút đầu 0x0 256: nút thứ 2 0x100 512: nút thứ 3 0x200
- kiểu Modality-related Result
0 :Application 0x0 4096: System modal (dialog has an icon) 0x1000 8192 :Task modal 0x2000
- kiểu Miscellaneous-related Result
0 :(nothing else special) 0x0 262144 :MsgBox has top-most attribute set 0x40000 524288 :title and text are right-justified 0x80000
Ví dụ: - Code:
-
MsgBox(4096, "Test", "This box will time out in 10 seconds", 10) | |
|