C# Question.
Hi,
While the program is performing a task code, for example, looping or reading a text file a mysql database, how can one display a running counter on the same form the task was originated or a separate form. (Thus at same time do a task and also display/update a label with counter value).
In Form 1 the following:
- Setup to text file and mysql connection.
- Read line for line by using a while statement.
- After line was read, other codeinterpret the line and do somethigh and then by using SQL insert statement add to Mysql database.
Question.
While looping want to display to the user that somethigh is happening. Perhaps display counter for every line read and display as labelon same form1 or it can be a another form just displaying the counter value. I tried to use thread, but does not want to work. There should be a simple solution ?
Can anyone give a suggestion ?
Thank you