A
Anders Thomsen
Hi ng,
I have a problem when trying to focus certain forms.
My application consists of several forms, at first form1 is shown. Clicking
a button here will close form1 and show form2. When form2 i showing, I try
to open the File manager in PPC. From here, I can navigate to my project
folder and open my application by clicking on the .exe. This opens up the
app where I left it, showing form2 - as suspected.
Then I click a button on form2 which closes form2 and create a new instance
of Form1 (the first instance was disposed and it's reference set to null).
On this new instance i've tried to call BringtoFront(), Focus(), Show and
Visible = true, but I simply can't get the form to show. Instead, the file
manager is shown - which is okay, since it's the next form in the Z-order
after form2. But after creating Form1 and calling BringToFront etc. I
believe that form1 should be put on top.
How can I activate form1?
Thanks in advantage,
I have a problem when trying to focus certain forms.
My application consists of several forms, at first form1 is shown. Clicking
a button here will close form1 and show form2. When form2 i showing, I try
to open the File manager in PPC. From here, I can navigate to my project
folder and open my application by clicking on the .exe. This opens up the
app where I left it, showing form2 - as suspected.
Then I click a button on form2 which closes form2 and create a new instance
of Form1 (the first instance was disposed and it's reference set to null).
On this new instance i've tried to call BringtoFront(), Focus(), Show and
Visible = true, but I simply can't get the form to show. Instead, the file
manager is shown - which is okay, since it's the next form in the Z-order
after form2. But after creating Form1 and calling BringToFront etc. I
believe that form1 should be put on top.
How can I activate form1?
Thanks in advantage,