Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If MessageBox.Show("Sila Pastikan Data MyKad Anda." & vbNewLine & vbNewLine & "Nama:" & TextBox1.Text & vbNewLine & "No I/C: " & icTextBox.Text &, MessageBoxButtons.OKCancel) = MsgBoxResult.Cancel Then
' nothing
Else
MessageBox.Show("ok")
End If
End Sub
答案 0 :(得分:0)
您尝试将Show()与MessageBoxButtons设置一起使用,但该调用需要3个参数。尝试为通话添加标题;
If MessageBox.Show("Are you sure to edit Student data with Id." & vbNewLine & vbNewLine & "Name:" & TextBox1.Text & vbNewLine & "No ID: " & idTextBox.Text, "Title", MessageBoxButtons.OKCancel) = MsgBoxResult.Cancel Then
' nothing
Else
MessageBox.Show("ok")
End If