Public Class frmViewError
  Inherits System.Windows.Forms.Form
  Private Const UNUSED_ERROR_NUMBER As String = "Application-defined " & _
             "or object-defined error."

  ' Kod generowany przez Windows Form Designer 

  Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As _
                System.EventArgs) Handles btnExit.Click
    Me.Dispose()
  End Sub

  Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As _
                System.EventArgs) Handles btnStart.Click
    Dim i As Integer, ValidErrors As Integer
    Dim temp As String

    ValidErrors = 0
    For i = 0 To 1000    ' Kody błędów poniżej 1000 są zarezerwowane 
      temp = ErrorToString(i)
      If temp <> UNUSED_ERROR_NUMBER And temp <> "" Then
        txtOutput.Text &= Format(i, "000") & " " & ErrorToString(i) & _
                    vbCrLf
        ValidErrors += 1
      End If
      lblProgress.Text = "Processing error number: " & CStr(i)
      Me.Update()
    Next
    lblProgress.Text = "Total usable error messages: " & _
            CStr(ValidErrors)
  End Sub
End Class
