CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: VB.NET

Test

97 Views
Copy Code Show/Hide Line Numbers
   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
by Justin Davis
  May 13, 2010 @ 1:13pm
Tags:
Description:
test

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate