Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

FileDialog filter makes response slow

$
0
0

When I add a simple filter to a openFileDialog, it can take several seconds to respond following the selection of a single file.

Here is the code:

openFileDialog1.Filter = "Runtime parameters (*.rp)|*.rp";

if (DialogResult.OK == openFileDialog1.ShowDialog(this))

{

FileNameTextBox.Text = openFileDialog1.FileName;

}

It takes several seconds ( a variable length of time) for the text in FileNameTextBox to be updated after a file is selected.  If I remove the filter, the response is almost immediate.  Why does the filter add several seconds?  The file type *.rp is simply an XML file that my system associates with Notepad.

Thanks for any hints.

Steve Strommen


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>