|
|
Title | Determine the default button when displaying a MsgBox in Visual Basic 2005 |
Description | This example shows how to determine the default button when displaying a MsgBox in Visual Basic 2005. The fifth parameter to MessageBox.Show indicates the default button. |
Keywords | MessageBox, MsgBox, message box, default button, VB.NET |
Categories | Software Engineering |
|
|
The fifth parameter to MessageBox.Show indicates the default button. This example sets that parameter to MessageBoxDefaultButton.Button2. That makes the second button thue default button so it is initially selected when the message box appears.
|
|
MessageBox.Show( _
"This is the message", _
"The Caption", _
MessageBoxButtons.YesNoCancel, _
MessageBoxIcon.Information, _
MessageBoxDefaultButton.Button2)
|
|
|
|
|
|