VB.Net Forms Confirmation Box

Posted by Cheyne | Posted in Tips & Tricks | Posted on 10-11-2009

1

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

Comments (1)

It is really a nice and useful pieece oof info. I’m satisfied that you simply
shared this useful info with us. Please stay us up to dae like this.

Thanks for sharing.

Write a comment

*