[기타] [vb.net] GetFile / GetPath
하나를하더라도최선을
2019-10-09 01:33
8,192
0
본문
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
댓글목록0