Miguel
Miguel

Reputation: 1177

Issue with Listing Files During Load Event

I created a program that lists all the files you have in a certain(select-able) directory with the file extension ".pdf" and allows the user send these files to a network drive.

For some reason it works great on every computer except for one and takes about 10 minutes to load.

Is there any way to see what is happening on their side and why it might be hanging up.

Upvotes: 1

Views: 57

Answers (2)

Miguel
Miguel

Reputation: 1177

The user had a vast amount of files on his directory therefore searching all these file was the issue.

Upvotes: 0

Muhammad Hasan Khan
Muhammad Hasan Khan

Reputation: 35126

Don't list the files in Form_Load event. On a slow fragmented disk it can take longer to list the files.

Do it in BackgroundWorker

Upvotes: 1

Related Questions