Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all,

 

I have two forms the first processes a big amount of information, and the second is na progress forms informing the user the progress of this processing.

When i call the progress form, from the main form and i try to write in its progressbar, i get the interface very slow and the apolication hang up and stays bloced, give the idea that the program is not responding, how can i use this functionality by without hang up the app.?

I tried to use Application.DoEvents() but it does't solve the issue.

 

Any help, will be appreciated,

TIA

Tiago Teixeira

Posted

Are you using two threads? One for the work, the other for the display?

 

If you are using .Net 2.0 this can be easily achieved with the BackgroundWorker component.

Posted

No, im using for now 1 thread, the UI thread itself.

I cannot understand yet how backgroundworker works very welll.

 

I wanna update the splash screen with current processing information , in a label and i wanna pass a percentage value to increment in the progressbar as well as.

 

Can you please do me a simple example about this?

 

TIA,

 

Tiago Teixeira

Posted (edited)

I'm adding comments to some sample code I'll post up for you.

 

Edit: See the attached code sample. I hope C# works for you. Everything should work without any problems...so if there are just let me know. Feel free to ask any questions.

Threading Experiment.zip

Edited by mskeel
Posted

Thanks a lot for the nice sample. It took me doughts off.

I was a little confused, abou how to do this, but with your nice coments i got it all.

 

Regards and nice weekend,

 

Tiago TEixeira

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...