Place to share anything

Free Software, Download, Tips and Tutorials, Cars, Notebook, Review

SharpDevelop Tutorial–MessageBox #2

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:

OK Cancel Question

OK Cancel Question

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
  • Share/Bookmark

Related posts:

  1. SharpDevelop Tutorial-Change String into Lower Case and Upper Case Hi, see you again in this SharpDevelop tutorial. Now we...
  2. Boolean operation in sharpdevelop In this simple tutorial I will show how to use...
  3. Integer calculation in Sharpdevelop See you again in Sharpdevelop tutorial. This time we will...
  4. How to Join string in Sharpdevelop In this tutorial I will show you how to join...
  5. 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.

Leave a Reply