MsgBox("確認刪除這條數據嗎", MsgBoxStyle.YesNo)//要点击两次确认
Dim resultCode As Integer = 0
resultCode = MsgBox("asd", MsgBoxStyle.YesNo).GetHashCode
If resultCode = MsgBoxResult.Yes Then
end if
------解决方案-------------------- If MsgBox("asd", MsgBoxStyle.YesNo).GetHashCode == DialogResult.Yes Then 试试,我不是很懂vb,你查一下msdn,只用一行代码或者用DialogResult枚举,就会只点一次。原理大概是因为MsgBoxResult.Yes 又实例化了一次,好像,记不得了