FolderBrowserDialog question

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

How do you detect n code that the cancel button was clicked in the folder
browser dialog (Vs2005)

Thanks for any help

Bob
 
Hi,

If you use showdialog to show the Folderbrowserdialog you check
the dialogresult returned. In this example the code only runs if the user
clicked the ok button

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

MessageBox.Show(FolderBrowserDialog1.SelectedPath)

End If



Ken
 
Thanks

Ken Tucker said:
Hi,

If you use showdialog to show the Folderbrowserdialog you check
the dialogresult returned. In this example the code only runs if the user
clicked the ok button

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

MessageBox.Show(FolderBrowserDialog1.SelectedPath)

End If



Ken
 
Back
Top