VB.Net Forms Confirmation Box

How to create a simple confirmation box in a VB.Net WinForms application.    This will pop up a typical “Do You Wish To Continue ? ” Box , to which each button has a different action.

1
2
3
4
5
6
7
8
 
Dim Box As MsgBoxResult = MsgBox("Are You Sure You Wish To Delete This ?",MsgBoxStyle.YesNo)
 
If Box = MsgBoxResult.Yes Then
MsgBox("Done")
Else
MsgBox("Not Done")
End If

10 Responses to “VB.Net Forms Confirmation Box”

  1. shan  on February 23rd, 2010

    thanks sooooo muchh this helps me very much also this is more smarter than others availabale

  2. rfiatt  on June 19th, 2010

    thanks bro! yeah as shan said this one is made the right way

  3. rakeshpatil  on July 21st, 2010

    Smart and simple solution for taking confirmation from the user and work accordingly.Thank you for the solutions, after searching for many sample this one I found very easy and effective.

  4. Bunny  on November 14th, 2010

    Hai,
    Thank you very much.. Its too simple and effective… Others are so confusing and lot of coding.. Thanks very much.. its save my hours..

  5. nptolentino  on February 7th, 2011

    This is a good piece of code.

  6. ram  on March 31st, 2011

    Thanks man nice code

  7. vikram  on June 14th, 2011

    Thank;s a Lot

  8. Nithya  on September 5th, 2011

    Thanks,Most useful

  9. Ganesh  on December 5th, 2011

    Thanks good one, Useful one….:)

  10. Chandralekha  on February 1st, 2012

    Thanks a lot,


Leave a Reply