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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top