Prüfung auf allfällige Daten-Changes. Wurden Daten verändert, kann der User entscheiden, ob gespeichert, nichtgespeichert oder das Formular nicht gespeichert werden soll.
[Visual Basic] Private Sub frmDomainEditor_FormClosing( _
ByVal sender As Object, _
ByVal e As FormClosingEventArgs _
) Handles _
Me.FormClosing
[Visual Basic] Private Sub frmDomainEditor_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If Me.ds.HasChanges Then
Dim msg As New TKB.VV.Utils.MyMessage
Dim msgboxres As MsgBoxResult
msgboxres = msg.Show_MessageYesNoCancel(3)
If msgboxres = MsgBoxResult.Cancel Then
e.Cancel = True
Exit Sub
End If
If msgboxres = MsgBoxResult.Yes Then
Try
da.Update(ds, "ExtTable")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End If
Try
Me.co.Close()
da.Dispose()
co.Dispose()
cb.Dispose()
ds.Dispose()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Plattformen: Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition