Click to See Complete Forum and Search --> : Form comes on TOP


amit29
June 12th, 2007, 07:48 AM
In my application, two forms, form1 and form2 are created in different thread.

I create another form, say form3, in same thread of form1.

When I start my application, from1 and form2 are invoked.

There is one button on form1 to start form3 (form3.show).



See following steps:



1. Click button on form1, form3 is displayed(TopMost property is True).

2. Immedietely switch to form2(diff.thread)

3. Click title bar of form3,

(Note: after clicking button on form1 to start form3 some processing is happening on form1.)


After step 3, when processing on form1 finishes, form1 automatically comes to forground.



Can somebody tell, what could be the possible reason for this ?

Is it the issue related to threading ?



How to overcome this problem ?

Thanks in Advance.

amit29
June 12th, 2007, 07:52 AM
I am doing coding in VB .Net and VS 2003