Language: VB.NET
Test
1: Public Class frmMain 2: 3: Public Sub New() 4: InitializeComponent() 5: End Sub 6: 7: Private Sub frmMain_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Me.Closing 8: Try 9: If MsgBox("Are you sure you want to exit?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Exit?") = MsgBoxResult.No Then 10: e.Cancel = True 11: End If 12: Catch ex As Exception 13: mLogger.Error(ex) 14: End Try 15: End Sub 16: 17: Private Sub mnuAbout_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles mnuAbout.Click 18: Try 19: ShowAbout() 20: Catch ex As Exception 21: mLogger.Error(ex) 22: End Try 23: End Sub 24: 25: Private Sub ShowAbout() 26: Try 27: Dim about As New EIS.CommonUI.frmAbout 28: about.ShowDialog() 29: Catch ex As Exception 30: mLogger.Error(ex) 31: End Try 32: End Sub 33: 34: Private Sub mnuExit_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles mnuExit.Click 35: Me.Close() 36: End Sub 37: End Class
Tags:
Description:
test
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search

