Forms and threads

mberube

Member
Joined
Jun 17, 2005
Messages
10
Location
Quebec, Quebec, Canada
Programming Experience
1-3
Hi there! I'm currently making an application that calculate area of some regions that are in some others. This is a pretty long process that takes hours. This is a normal process as it is heavily complicated. Due to this, I made a form wich would be the status form. It has 1 progress bar and a cancel button. When I first implemented it, the form wasn't showing at all, because the processes. I asked for help and someone told me to make a different thread that would refreh the form. I did this and now the form is perfectly refreshing and i can see the % of the completed work. Now here comes my problem, the form is showing but i can't access it. Means that i can't press the cancel button and i can't even move the form.¸

Does any1 know why? or have a better solution to this?

That would be greatly appreciated since i''ve been blocked on this problem for a week now and that i can't advance without that. Thanks for any help
 
I fixed my prob. Instead of creating a new Thread to refresh my form, I created a new thread for the process itself. Everything works fine now! I made the form Modal like jmcilhinney suggested me to to manage the cancel operations.

Thanks to anyone that tried to help, that is greatly appreciated, that was my fist question here but certainly not the last one ;) Ppl here are very good, thanx again!
 
please post how you achieved this

I'm trying to do the same thing,

Could you post how you achieved these results so that I may attempt to duplicate them. Thank you.
 
You have it switched around. The process that takes long should be the new thread (background process). This way the form stays active and you can press the cancel button.
 
Back
Top