Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim msg As MsgBoxResult
If MsgBox("Do you really want to exit ?", MsgBoxStyle.YesNo, "Exit") = msg.Yes Then
Its depends on your form, if your form is startup form of project you can use hide method otherwise you can use close method.
If your form is startup form and you use close method then you project is closed.
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
DialogResult = MsgBox("R U Sure, to Close the Form", MsgBoxStyle.OkCancel, "Confirmation")
If (DialogResult = Windows.Forms.DialogResult.OK) Then
Dim f As New Form1
e.Cancel = True
By mistake i have given the C#.Net code, this code is Equivalent VB Code for MsgBox Closing of Form.
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...