As a finishing touch to my application I wanted to add a pop-up panel that displayed the message "Searching For Files ..." where the dots " . " increased to ten and then reset again to signify that the application was busy and not just hung.
This is because my application is populating an array list with all the .rtf files located in a certain directory (there are thousands) and parsing the name then storing this in a SQL table.
I thought that the best practice would be to use the threading library and then call the sub to display the label as a seperate thread but alas I can't seem to get it to work properly. Even setting the priority to 4 (max) it still fails to display the panel until after the results have been found.
Atached is my program with a couple of sample files. I've added a sleep(3000) in the search routine to produce a slight delay which should be enough time for the label to be seen before the results are displayed.
No doubt it's me that is doing something wrong but I have no idea what. I've trying using DoEvents and forcing the label to the front. I've waited for the thread to start before calling the search routine and even waited until the label visible property is set but nothing has worked.
Please help!!!
Thanks,
RandomCoder
PS How many values can an array is hold? Is there a limit or is it purely memory dependant?
This is because my application is populating an array list with all the .rtf files located in a certain directory (there are thousands) and parsing the name then storing this in a SQL table.
I thought that the best practice would be to use the threading library and then call the sub to display the label as a seperate thread but alas I can't seem to get it to work properly. Even setting the priority to 4 (max) it still fails to display the panel until after the results have been found.
Atached is my program with a couple of sample files. I've added a sleep(3000) in the search routine to produce a slight delay which should be enough time for the label to be seen before the results are displayed.
No doubt it's me that is doing something wrong but I have no idea what. I've trying using DoEvents and forcing the label to the front. I've waited for the thread to start before calling the search routine and even waited until the label visible property is set but nothing has worked.
Please help!!!
Thanks,
RandomCoder
PS How many values can an array is hold? Is there a limit or is it purely memory dependant?