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

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?
 
S

ShaneB

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

ShaneB
 
S

ShaneB

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

ShaneB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top