vbAccelerator - Contents of code file: mErrors.bas

Attribute VB_Name = "mErrors"
Option Explicit

Public Enum EErrorConstants
   eeFailCreateDisplay
   eeFailCreateBrush
   eeFailGetDesktop
End Enum

Public Sub ThrowError( _
      ByVal lErr As EErrorConstants _
   )
Dim eType As VbMsgBoxStyle
Dim sMsg As String

   eType = vbInformation
   Select Case lErr
   Case eeFailGetDesktop
      sMsg = "Failed to capture desktop image."
   Case eeFailCreateDisplay
      sMsg = "Failed to create display."
      eType = vbCritical
   Case eeFailCreateBrush
      sMsg = "Failed to create brush."
   End Select
   MsgBox sMsg, eType
End Sub