المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Block parent form



C# Programming
08-22-2009, 06:37 PM
Hello,

I've got a main form and a status form. The status form is displayed non-modally (Show method), and updated using Application.DoEvents() while working on a bigger job.

Now the problem is that the main form is not blocked while performing the job. Both the status form and the main form can be focused. What I'd like to have is that the main form is blocked and redirects the focus to the status form, just like it would be the case for modal dialogs. Is this possible?

I tried setting the Owner property of the status form to the main form, but it didn't have any effect. The ParentForm property is read only, and the Parent property only applies to standard controls, not forms...

Thanks and best regards
Dominik

PS: Moving the job to another thread isn't possible.

Too many passwords to remember? Try KeePass Password Safe (http://keepass.info/)!