How to detect CANCEL with the FolderBrowserDialog

I need to know if the user chooses cancel when the dialog appears other than saying, if Old Selected path <> new Selected Path.

 

 

 

Thanks.



Answer this question

How to detect CANCEL with the FolderBrowserDialog

  • KeBugCheck

    The FolderBrowserDialog should have a method ShowDialog that returns a DialogResult.  You can use this return value to see what button was pressed.

  • neemik

    If FBD.ShowDialog = Windows.Forms.DialogResult.OK Then

    Else

    Label1.Text = "User aborted - no path selected"

    End If

    I found this in the snippet section and goes to else when cancel is selected.

    Thanks.


  • How to detect CANCEL with the FolderBrowserDialog