Prevent Closing Forms

vbimport

#1

In VB.Net using NeroCOM, how do you prevent a user from closing a form during the burn process.

This is the code I have used on the Form_Closing event…

Private Sub Form2_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
If StillBurn = True Then
MessageBox.Show(“Backup Still In Process, Please Wait!”, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error)
Exit Sub
Else
Application.Exit()
End If
End Sub


#2

Private Sub Form2_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing

If StillBurn Then
      e.Cancel=True
End If

End Sub


#3

Thanx, How could I have missed that!!

:bow: