기타 [vb.net] GetFile / GetPath
페이지 정보

본문
    Private Function GetFile() As String
        Dim OFD As OpenFileDialog = New OpenFileDialog
        OFD.Filter = "Files|*.*"
        OFD.FileName = "Select a File"
        Dim result As DialogResult = OFD.ShowDialog()
        If result = Windows.Forms.DialogResult.OK Then
            Return System.IO.Path.GetFullPath(OFD.FileName)
        End If
        Return Nothing
    End Function
    Private Function GetPath() As String
        Dim FD As FolderBrowserDialog = New FolderBrowserDialog
        Dim result As DialogResult = FD.ShowDialog()
        If result = DialogResult.OK Then
            Return FD.SelectedPath & ""
        End If
        Return Nothing
    End Function
- 이전글[vb.net] HTML 정리 및 테그 제거 19.10.09
- 다음글[vb.net] 암호화 키 생성 및 암호화, 복호화 예제 19.10.08
댓글목록
등록된 댓글이 없습니다.





