Private Sub RecepcionDTrigo_FormClosing(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Dim Respuesta As MsgBoxResult
Respuesta = MsgBox("¿Realmente deseas cerrar Recepción de Materia Prima?", MsgBoxStyle.DefaultButton2 Or MsgBoxStyle.Exclamation Or MsgBoxStyle.YesNo)
If Respuesta = MsgBoxResult.Yes Then
'Me.Close()
'End
' Cerrar la conexión
Try
If ObjetoConectar.State = ConnectionState.Open Then
ObjetoConectar.Close()
End If
Catch
End Try
e.Cancel = False
Else
e.Cancel = True
End If
End Sub