Public Class frmWrpMsg
    Private mstrImgFile As String
    Private mintRtnCode As Integer
    Private mintSelection As Integer
    Public Sub New()
        MyBase.New()
        InitializeComponent()
    End Sub
    Private Sub frmWrpMsg_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim rtn As Integer

        Try
            'rtn = WarpFrame1.Open()
            'If (rtn <> 0) Then
            '    Err.Raise(vbObjectError + 1, gAppName, "WarpError")
            'End If

            'WarpBox1.SetImage(mstrImgFile)

            'WarpBox1.Image = Image.FromHbitmap(mstrImgFile)

            'Dim NewPic As New System.Drawing.Bitmap(mstrImgFile)
            'WarpBox1.Image = NewPic


            If mstrImgFile.Contains("0010") And mstrImgFile.Contains("E066") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = True
                E066_0020.Visible = False
                E066_0100.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("0020") And mstrImgFile.Contains("E066") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = True
                E066_0100.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("0100") And mstrImgFile.Contains("E066") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0100.Visible = True
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("0230") And mstrImgFile.Contains("E066") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0100.Visible = False
                E066_0230.Visible = True
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("2010") And mstrImgFile.Contains("E066") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0100.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = True
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("2020") And mstrImgFile.Contains("E066") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0100.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = True
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("2030") And mstrImgFile.Contains("E066") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0100.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = True
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("2040") And mstrImgFile.Contains("E066") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0100.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = True
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("2050") And mstrImgFile.Contains("E066") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0100.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = True
            ElseIf mstrImgFile.Contains("0100") Then
                WarpBox1.Visible = False
                E_0100.Visible = True
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("0010") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = True
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("0230") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = True
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("0020") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = True
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("2010") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = True
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("2020") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = True
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("2030") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = True
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("2040") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = True
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            ElseIf mstrImgFile.Contains("2050") Then
                WarpBox1.Visible = False
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = True
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            Else
                WarpBox1.Visible = True
                E_0100.Visible = False
                E_0010.Visible = False
                E_0230.Visible = False
                E_0020.Visible = False
                E_2010.Visible = False
                E_2020.Visible = False
                E_2030.Visible = False
                E_2040.Visible = False
                E_2050.Visible = False
                E066_0010.Visible = False
                E066_0020.Visible = False
                E066_0230.Visible = False
                E066_2010.Visible = False
                E066_2020.Visible = False
                E066_2030.Visible = False
                E066_2040.Visible = False
                E066_2050.Visible = False
            End If




            sMain()


            'rtn = WarpFrame1.Close()

            'If (rtn <> 0) Then
            '    Err.Raise(vbObjectError + 1, gAppName, "WarpError")
            'End If


            'Me.Close()

            Exit Sub

        Catch ex As Exception
            sErrLog(gAppName, "frmWrpMsg_Load", ex.ToString)
        End Try
    End Sub
    Public Sub sMain()
        'Dim WKey As UInteger
        'Try
        '    Do While (True)
        '        'WKey = WarpFrame1.Input(WarpField1)

        '        WKey = WarpField1.Text

        '        If WKey = Bt.LibDef.BT_KEY_ENT Then

        '            If mintSelection = 2 Then
        '                mintRtnCode = Bt.LibDef.BT_KEY_ENT
        '                Exit Do
        '            End If
        '        ElseIf WKey = Bt.LibDef.BT_KEY_F1 Then
        '            If mintSelection = 1 Or mintSelection = 2 Then
        '                mintRtnCode = Bt.LibDef.BT_KEY_F1
        '                Exit Do
        '            End If
        '        ElseIf WKey = Bt.LibDef.BT_KEY_F2 Then
        '            If mintSelection = 3 Then
        '                mintRtnCode = Bt.LibDef.BT_KEY_F2
        '                Exit Do
        '            End Ifs
        '        ElseIf WKey = Bt.LibDef.BT_ERR Then

        '            mintRtnCode = Bt.LibDef.BT_ERR
        '            Exit Do
        '        End If
        '    Loop
        '    Exit Sub
        'Catch ex As Exception
        '    sErrLog(gAppName, "sMain", ex.ToString)
        'End Try

    End Sub

    Public WriteOnly Property pImgFile() As String
        Set(ByVal strValue As String)
            mstrImgFile = strValue
        End Set
    End Property
    Public WriteOnly Property pSelection() As Integer
        Set(ByVal strValue As Integer)
            mintSelection = strValue
        End Set
    End Property
    Public ReadOnly Property pRtnCode() As String
        Get
            pRtnCode = mintRtnCode
        End Get
    End Property

    Private Sub frmWrpMsg_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        Select Case e.KeyCode.ToString()
            Case "Return"
                
                Exit Sub
            Case "F1"
                Me.Close()
                Exit Sub
            Case "F2"

                Me.Close()
                Exit Sub
        End Select
    End Sub
End Class