[Help] Folder dialog close event?

Posts 1–2 of 2 · Page 1 of 1
[Help] Folder dialog close event?
I currently have a folder dialog that allows you to choose a folder but I need to somehow make my app do something if you close the dialog pre-maturely or at least, disable the X button... Any ideas?

[php] Private Sub doFolderSelect()
Try
Dim FolderBrowserDialog1 As New FolderBrowserDialog

With FolderBrowserDialog1
****otFolder = Environment.SpecialFolder.Desktop
Dim folder As String = "C:\"
.SelectedPath = folder
.Description = "Select the folder:"
If .ShowDialog = DialogResult.OK Then
If IO.File.Exists(.SelectedPath) Then
MsgBox("Folder exists!")
End If
End If
End With
Catch ex As Exception
End Try
End Sub[/php]

Of course that is not my real code but that's pretty much what it is..
If.IO.Directory.Exists(Directory)

Not .File...

------------------

If .ShowDialog = Dialogresult.Cancel Then
MsgBox("You closed the dialog, I'm so going to rape your pc now. ")
End if
Posts 1–2 of 2 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?