SharpDevelop Tutorial–MessageBox #2
June 2nd, 2009
Ini adalah lanjutan dari tutorial Sharp Develop yang pertama. Dalam kesempatan ini akan dipelajari penggunaan lain dari message box. Bagaimana menggunakan message box sebagai konfirmasi sebelum prosedur/event lain di eksekusi. Misal: Untuk membuat pertanyaan sebelum menghapus suatu record, atau konfirmasi pada saat mau keluar dari program.
Perhatikan contoh berikut:
Untuk membuat seperti diatas, sangatlah mudah. Ikuti code berikut ini
Sub Button1Click(sender As Object, e As EventArgs)
If msgbox(”Anda ingin keluar dari program ini?”, MsgBoxStyle.OkCancel,”Delete”)=msgboxresult.Ok Then
‘kode anda disini
End If
End Sub
Note:
Untuk MsgboxStyle nya bisa anda pilih dari drop-down list di SharpDevelop, ada banyak pilihan.
Sub Button1Click(sender As Object, e As EventArgs)
If msgbox(”Anda ingin keluar dari program ini?”, MsgBoxStyle.OkCancel,”Delete”)=msgboxresult.Ok Then
‘kode anda disini
End If
End Sub
Related posts:
- SharpDevelop Tutorial-Change String into Lower Case and Upper Case Hi, see you again in this SharpDevelop tutorial. Now we...
- Boolean operation in sharpdevelop In this simple tutorial I will show how to use...
- Integer calculation in Sharpdevelop See you again in Sharpdevelop tutorial. This time we will...
- How to Join string in Sharpdevelop In this tutorial I will show you how to join...
- Copy string in sharpdevelop To copy string in sharpdevelop is easy. Like in visual...
Related posts brought to you by Yet Another Related Posts Plugin.









