home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic .NET - Read Less - Learn More / Visual_Basic.NET_Read_Less_Learn_More_Richard_Bowman_Visual_2002.iso / Resources / Code / Ch11-UsingEventLog / Form1.vb < prev   
Text File  |  2001-09-02  |  2KB  |  54 lines

  1. Imports System.Diagnostics
  2.  
  3. Public Class Form1
  4.     Inherits System.Windows.Forms.Form
  5.  
  6. #Region " Windows Form Designer generated code "
  7.  
  8.     Public Sub New()
  9.         MyBase.New()
  10.  
  11.         'This call is required by the Windows Form Designer.
  12.         InitializeComponent()
  13.  
  14.         'Add any initialization after the InitializeComponent() call
  15.  
  16.     End Sub
  17.  
  18.     'Form overrides dispose to clean up the component list.
  19.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  20.         If disposing Then
  21.             If Not (components Is Nothing) Then
  22.                 components.Dispose()
  23.             End If
  24.         End If
  25.         MyBase.Dispose(disposing)
  26.     End Sub
  27.  
  28.     'Required by the Windows Form Designer
  29.     Private components As System.ComponentModel.Container
  30.  
  31.     'NOTE: The following procedure is required by the Windows Form Designer
  32.     'It can be modified using the Windows Form Designer.  
  33.     'Do not modify it using the code editor.
  34.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  35.         '
  36.         'Form1
  37.         '
  38.         Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
  39.         Me.ClientSize = New System.Drawing.Size(292, 273)
  40.         Me.Name = "Form1"
  41.         Me.Text = "Form1"
  42.  
  43.     End Sub
  44.  
  45. #End Region
  46.  
  47.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  48.         Dim ev As New EventLog("Application")
  49.         ev.WriteEntry("MyApplication", "Application started.", _
  50.             EventLogEntryType.Information)
  51.     End Sub
  52.  
  53. End Class
  54.