Public Class frmSelectFile

    Private Sub btnBrowse_Click(sender As System.Object, e As System.EventArgs) Handles btnBrowse.Click
        Dim openDialog As New OpenFileDialog()
        openDialog.FileName = ""
        openDialog.Filter = "CSS Files(*.css)|*.css"
        openDialog.FilterIndex = 8
        openDialog.Title = "Select File"
        If openDialog.ShowDialog() = DialogResult.OK Then
            txtURL.Text = openDialog.FileName
            txtURL.Focus()
        End If
    End Sub

    Private Sub frmSelectFile_Activated(sender As Object, e As System.EventArgs) Handles Me.Activated
        txtURL.Focus()
        If txtURL.Text.Length > 0 Then
            btnOK.Enabled = True
        Else
            btnOK.Enabled = False
        End If
    End Sub

    Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click
        m_returnValue = ""
        Me.Close()
    End Sub

    Private Sub btnOK_Click(sender As System.Object, e As System.EventArgs) Handles btnOK.Click
        m_returnValue = txtURL.Text
        Me.Close()
    End Sub

    Private Sub txtURL_TextChanged(sender As System.Object, e As System.EventArgs) Handles txtURL.TextChanged
        If txtURL.Text.Length > 0 Then
            btnOK.Enabled = True
        Else
            btnOK.Enabled = False
        End If
    End Sub
End Class