By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,234 Members | 1,877 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,234 IT Pros & Developers. It's quick & easy.

window appears when thread is done

P: n/a
Hello,

I have an application with several windows forms. On form A, I run a
thread. Meanwhile, another windows form, say B, is opened. But when the
thread, started from form A is finished, form A appears on top of form B.

Does anyone knows a method or setting to prevent form A from being
placed on top of B when the thread is finished?

Thanks,

Steven
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Steven,

Me.BringToFront()

I hope this helps?

Cor
Hello,

I have an application with several windows forms. On form A, I run a
thread. Meanwhile, another windows form, say B, is opened. But when the
thread, started from form A is finished, form A appears on top of form B.

Does anyone knows a method or setting to prevent form A from being
placed on top of B when the thread is finished?

Thanks,

Steven

Nov 21 '05 #2

P: n/a
* Steven <us**@example.net> scripsit:
I have an application with several windows forms. On form A, I run a
thread. Meanwhile, another windows form, say B, is opened. But when
the thread, started from form A is finished, form A appears on top of
form B.


Are you sure you never access the controls/forms from the other thread?
Are you creating the 2nd form inside the other thread? Notice that
Windows Forms controls' instance members are not safe for
multithreading.

If you are not accessing the controls/forms from the thread <> the UI
thread, you may want to call the form's 'Activate' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.