Public Class clsWrpMsg
    Private WithEvents frmMessage As New frmWrpMsg
    Private WithEvents tmrClose As Timer

    Private mstrImgFile As String               '‰æ‘œƒtƒ@ƒCƒ‹
    Private mintRtnCode As Integer              '‰Ÿ‰º‚³‚ê‚½ƒ{ƒ^ƒ“ID
    Private mintSelection As Integer            '‘I‘ð‚³‚ê‚½ƒ‚[ƒh
    Public gstrRtnCode As String                '‰Ÿ‰º‚³‚ê‚½ƒ{ƒ^ƒ“–¼



    '// ƒvƒƒpƒeƒB’è‹`ƒGƒŠƒA /////////////////////////////////////////////////////////////////////

    '‰æ–Ê•\Ž¦Œ`‘ÔƒvƒƒpƒeƒB
    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


    'ƒL[ƒR[ƒhƒvƒƒpƒeƒB
    Public ReadOnly Property pRtnCode() As String
        Get
            pRtnCode = mintRtnCode
        End Get
    End Property

    '// ƒƒ\ƒbƒh’è‹`ƒGƒŠƒA /////////////////////////////////////////////////////////////////////

    Public Sub sMsgBox()

        frmMessage.pImgFile = mstrImgFile
        frmMessage.pSelection = mintSelection
        'MsgBox‚ð•\Ž¦
        'frmMessage.Show()
        frmMessage.ShowDialog()

        mintRtnCode = frmMessage.pRtnCode

        frmMessage.Dispose()

    End Sub

    '4•bŒã‚ÉƒtƒH[ƒ€‚ð•Â‚¶‚é(OKƒ{ƒ^ƒ“‰Ÿ‰º‚Ì’l‚ð•Ô‚·)
    Private Sub tmrClose_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrClose.Tick

        System.Threading.Thread.Sleep(4000)
        frmMessage.Dispose()
        tmrClose.Dispose()
        gstrRtnCode = "OK"

    End Sub

End Class
