
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am looking to get a directory name from the user but be able to utilize the Autodesk OpenFileDialog (our users have a bunch of shortcuts along the left side). So I set the AllowFoldersOnly flag, but can't seem to get it to go to a specified default directory location. In this case I'm forcing it to C:\temp, but in the full code, I will be deriving this location by other code.
Any help or direction would be greatly appreciated.
thanks
Dim ToDialogRes As System.Windows.Forms.DialogResult
Dim flags As Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDialogFlags = Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDialogFlags.AllowFoldersOnly
Dim openFileDialog2 As New Autodesk.AutoCAD.Windows.OpenFileDialog("Please Select Target Directory", "C:\temp", "", "Select Directory", flags)
ToDialogRes = openFileDialog2.ShowDialog()
Select Case ToDialogRes
Case System.Windows.Forms.DialogResult.OK
TextBox1.Text = openFileDialog2.Filename
Case System.Windows.Forms.DialogResult.Cancel
MsgBox("User Cancelled")
Case Else
MsgBox("something else")
End Select
Solved! Go to Solution.