Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
problem to create a form that allow fields to updated , without user interaction.

If you have a button of the form. No problem the label can be updated. If the application start the job without user interaction the label is not updated.

Do you thread it but where or how you do build the form?

thanks dave
Posted
Comments
Pradeep Shukla 17-Sep-11 17:21pm    
It's not clear what you exactly want to ask...can you be precise with your question...
BillWoodruff 18-Sep-11 3:33am    
Very confusing question: what is the source of the updates here ? Are the "fields" of the Form bound to a database in some way, or hooked up to some Service, or RSS, or what ?

Please carefully describe what you start with here, what you create in code, and what the purpose of the solution is. best, Bill

The main reason why a control is not updated would be because your code is 100% busy doing something.

If you application is performing CPU intensive task and want to update the UI regulary, the best option is to use a BackgroungWorker[^]

You will the do the CPU intensive code in another thread and more or less regulary report progress to the main thread.

You would call ReportProgress to report the progress percentage and if desired some more information.

You start by dropping a BackgroundWorker from the toolbox onto your form and adjust its property and implement appropriate events handler.

The final thing to be aware is that you want to call ReportProgress often enough for you UI to display the current state. If you have a progress bar, the reporting progress every 1% is a good start.

If you report progress too often, then there would be some overhead and in the worst case, the actual work might be completed a lot before the UI has completed.

Generally it is not that hard to find a right middle.
 
Share this answer
 
Yes I think this is it.

I want to kick off a job and watch the status with no interaction.

Thank you very much
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900