With FolderBrowserDialog1
.RootFolder = Environment.SpecialFolder.Desktop
.Description = "เลือกโฟเดอร์ที่จัดเก็บฐานข้อมูลที่สำรองไว้"
If .ShowDialog = DialogResult.OK Then
' Display the selected folder if the user clicked on the OK button.
MessageBox.Show(.SelectedPath)
FileCopy(.SelectedPath, My.Application.Info.DirectoryPath)
' Err The target file "D:\Work\โปรแกรมขาย\โปรแกรมเทศบาล\People_Khanu\People_Khanu\bin\Debug" is a directory, not a file.
End If
End With
Dim di As DirectoryInfo = New DirectoryInfo(My.Application.Info.DirectoryPath)
If di.Exists Then
' Indicate that it already exists.
msgbox("That path exists already.")
Else
' Try to create the directory.
di.Create()
End If