VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Reading the WindowsNT / Windows 2000 EventLog in VB.NET

by Piyush Gupta (3 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 15th October 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Reading the WindowsNT / Windows 2000 EventLog in VB.NET

Rate Reading the WindowsNT / Windows 2000 EventLog in VB.NET




    Protected Sub Button1_Click(ByVal sender As Object, _
            ByVal e As System.EventArgs)
        
        Dim a As New EventLog()
        Dim objEventLog As EventLog.EventLogEntryCollection
        Dim objEntry As EventLogEntry
        
        a.Log = "Application"
        objeventlog = a.Entries()
        
        For Each objEntry In objEventLog
            Textbox1.Text += (objentry.Source & ":" & _
                objEntry.TimeGenerated & ":" & _
                objEntry.Message) & chr(13) & chr(10)
        Next
        
    End Sub


Download this snippet    Add to My Saved Code

Reading the WindowsNT / Windows 2000 EventLog in VB.NET Comments

No comments have been posted about Reading the WindowsNT / Windows 2000 EventLog in VB.NET. Why not be the first to post a comment about Reading the WindowsNT / Windows 2000 EventLog in VB.NET.

Post your comment

Subject:
Message:
0/1000 characters