Làm việc với messagebox
- Hiển thị hộp thoại chứa thông tin chỉ dẫn đến user
- Bao gồm các phần
–Text
–Button
–Symbol
- Lớp MessageBox có phương thức tĩnh Show để hiển thị dialog.
–Bắt giá trị trả về để biết phản ứng của user
- Có khoảng 21 phiên bản của Show
- Một số phiên bản thường sử dụng
MessageBox.Show (String strText)
MessageBox.Show (String strText, String strCaption)
MessageBox.Show (String strTex, String strCaption, MessageBoxButtons mbb)
MessageBox.Show (String strTex, String strCaption, MessageBoxButtons mbb, MessageBoxIcon mbi) MessageBox.Show (String strTex, String strCaption, MessageBoxButtons mbb, MessageBoxIcon mbi, MessageBoxDefaultButton mbdb)
MessageBox.Show (String strTex, String strCaption, MessageBoxButtons mbb, MessageBoxIcon mbi, MessageBoxDefaultButton mbdb, MessageBoxOptions mbo)