0

I have created a windows forms in which on certain button click i show FolderBrowserDialog. After the user selects a folder and click on Ok button of FolderBrowserDialog i have done some work in the Ok click part of FolderBrowserDialog.
For example

if (folderBrowserDialog.ShowDialog() == DialogResult.OK)
{
   generateFiles();
}

The Problem is: folderBrowserDialog doesent disappear completely untill generateFiles(); method has completely done it's job.

This behaviour has made my form look bad, because while generateFiles() method is working i have used progressbar to indicate the progress of generateFiles(); method.

How can i make FolderBrowserDialog disappear completely so that my progressbar looks good.

Please help.
Thanks

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by nccsbim071
0

Try calling Application.DoEvents() before calling generateFiles
---------
- G Himangi, LogicNP Software http://www.ssware.com
Shell MegaPack: Drop-In GUI Controls For Windows Explorer Like File And
Folder Browser Functionality
CryptoLicensing: Add licensing, copy-protection and activation to your
software
EZNamespaceExtensions: Fast and painless development of namespace extensions
EZShellExtensions: Rapid development of all shell extensions,explorer bars
and BHOs


I have created a windows forms in which on certain button click i show FolderBrowserDialog. After the user selects a folder and click on Ok button of FolderBrowserDialog i have done some work in the Ok click part of FolderBrowserDialog.
For example

if (folderBrowserDialog.ShowDialog() == DialogResult.OK)
{
   generateFiles();
}

The Problem is: folderBrowserDialog doesent disappear completely untill generateFiles(); method has completely done it's job.

This behaviour has made my form look bad, because while generateFiles() method is working i have used progressbar to indicate the progress of generateFiles(); method.

How can i make FolderBrowserDialog disappear completely so that my progressbar looks good.

Please help.
Thanks

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.