Problem with active state of a window......

  • Thread starter Thread starter Giox
  • Start date Start date
G

Giox

Hello everybody,
I have a problem when I try to activate my Window Form and I don't
understand why.
I have a owner form with 3 different owned forms and one of this forms
is named letter.
In my code I open all the owned form and I switch between them using
the visible property.
For example when I want to see the letter form I write the following
code:

letter.Visible = true;
letter.BringToFront();
MessageBox.Show("lettera.Focus()= "+lettera.Focus().ToString
()); // I use messagebox to evaluate the output
MessageBox.Show("lettera.Focused= "+lettera.Focused.ToString
()); // I use messagebox to evaluate the output
MessageBox.Show("lettera.Focused= "+lettera.Focused.ToString
()); // I use messagebox to evaluate the output

but when the form become visible I can see it but it's not the active
window (I have to vlick over it to see the prompt blinking inside the
textbox that's in the letter form....).
What's my error? if I try to evaluate the expression letter.Focused at
the end of the code it returns true... what's wrong?
 
Since that did not work, I would recommend posting enough code so that one
of us here can duplicate the problem.

ShaneB
 
Since that did not work, I would recommend posting enough code so that one
of us here can duplicate the problem.

ShaneB
 
Back
Top