Home All Groups Group Topic Archive Search About

FolderBrowserDialog question

Author
12 Aug 2006 11:43 PM
Bob
How do you detect n code that the cancel button was clicked in the folder
browser dialog (Vs2005)

Thanks for any help

Bob

Author
13 Aug 2006 1:24 AM
Ken Tucker [MVP]
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

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

Show quoteHide quote
"Bob" <bduf***@sgiims.com> wrote in message
news:%23K%23oQkmvGHA.4872@TK2MSFTNGP02.phx.gbl...
> How do you detect n code that the cancel button was clicked in the folder
> browser dialog (Vs2005)
>
> Thanks for any help
>
> Bob
>
Author
13 Aug 2006 2:57 PM
Bob
Thanks

Show quoteHide quote
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%23ZkA$cnvGHA.3936@TK2MSFTNGP04.phx.gbl...
> 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
>
> -----------------------
>
> "Bob" <bduf***@sgiims.com> wrote in message
> news:%23K%23oQkmvGHA.4872@TK2MSFTNGP02.phx.gbl...
>> How do you detect n code that the cancel button was clicked in the folder
>> browser dialog (Vs2005)
>>
>> Thanks for any help
>>
>> Bob
>>
>
>