i have some problem. when i run this project, only messagebox button ok appear, but button cancel do not show.
i’m using visual basic express edition 2008. and this is my codding.
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
You’re trying to use Show() with a MessageBoxButtons setting, but that call takes 3 parameters. Try adding a title to the call;