Vb.net visual studio中的msgbox按钮类型
如何设置具有“确定”和“取消”等按钮的消息框?我们还可以为按钮命名自己的名称吗?我们可以为这些按钮编写源代码吗Vb.net visual studio中的msgbox按钮类型,vb.net,visual-studio-2010,visual-studio,Vb.net,Visual Studio 2010,Visual Studio,如何设置具有“确定”和“取消”等按钮的消息框?我们还可以为按钮命名自己的名称吗?我们可以为这些按钮编写源代码吗 ok.click, form1.show() and if cancel.click form5.show() msgbox() 您可以使用enum在messagebox上指定不同类型的按钮,并在单击按钮后使用,为每种类型的messagebox按钮指定不同的操作。 或者试试这个: MessageBox.Show("put your text here", "here the titl
ok.click, form1.show() and if cancel.click form5.show()
msgbox()
您可以使用enum在messagebox上指定不同类型的按钮,并在单击按钮后使用,为每种类型的messagebox按钮指定不同的操作。
或者试试这个:
MessageBox.Show("put your text here", "here the title of you message", MessageBoxButtons.OKCancel, MessageBoxIcon.Hand)
在第二个逗号[,]之后,您可以放置按钮类型,最后您可以放置您认为最适合您的消息框的图标
关于这应该是可行的:
If (MsgBox("Your Text", MsgBoxStyle.OkCancel, "MessageBox Title") = MsgBoxResult.Ok) Then
Form1.Show()
Else
form5.show()
End If
这是一个简单的消息框:
If MessageBox.Show("some msg", "caption", MessageBoxButtons.OKCancel) = DialogResult.Cancel Then
' you cancel it, so i will show another message box
EndIf