- Back to Home »
- Visual Basic.Net , មេរៀនឆ្នាំទី៣ »
- Message Box
Posted by : Unknown
Saturday, December 8, 2012
MsgBox
The style code control which buttons to display-and there are six different combinations of OK, Cancel, Yes, No, Abort and Retry.It also control which, if any, of the four possible icons to include:
Critical, Question, Exclamation, Information. These can be specified using keywords or numeric codes, though the keywords only allow you to specify the buttons or the icon-not both at once.
Example:
MsgBox("Are you sure you want to do this?",MsgBoxStyle.YesNo, "YesNo")
MsgBox("Do you want to quit?" ,MsgBoxStyle.Question, "Question")
MsgBox("Do you want to quit?"
,MsgBoxStyle .Critical, "Critical")
MsgBox("Do you want to quit?" ,MsgBoxStyle.Exclamation, "Exclamation")