Dim TombolYgDiklik As System.Windows.Forms.DialogResult
TombolYgDiklik = MessageBox.Show("Keluar?", _
"Konfirmasi", MessageBoxButtons.YesNoCancel)
Select Case TombolYgDiklik
Case Windows.Forms.DialogResult.Yes
'proses jika user klik tombol YES
Case Windows.Forms.DialogResult.No
'proses jika user klik tombol NO
Case Windows.Forms.DialogResult.Cancel
'proses jika user klik tombol CANCEL
End Select
Hal serupa dapat dilakukan pada VB6 dan VB 2003.
Tidak ada komentar:
Posting Komentar