<p>I have problems with bringing a windows mobile 6 form to the front.
I tried things like this already</p>

<pre><code>Form1 testForm = new Form1();
testForm.Show();
testForm.BringToFront();
testForm.Focus();
</code></pre>

<p>But it's always behind the form that includes that code.
The only things that have worked for me are</p>

<pre><code>testForm.TopMost = true;
</code></pre>

<p>or Hide(); the old form and then show the new one, but i want to avoid hiding the other form. TopMost isn't very clean anyway with using multiple other forms.</p>

<p>The other thing that works is</p>

<pre><code>testForm.ShowDialog();
</code></pre>

<p>but I don't want to show the form modal.</p>

<p>To cut it short. I just want to show the new form in front of another form, and if I close it, I want to see the old form again.</p>

<p>Maybe someone can help me with this problem. Thank you.</p>

I haven't tried it in WM6, but you can use some pinvoke to call Win32 functions:
```
```
[DllImport("coredll.dll")]
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

[DllImport("coredll.dll", EntryPoint="SetForegroundWindow")]
private static extern int SetForegroundWindow(IntPtr hWnd);
```
```
Call FindWindow to get the handle and then call SetForegroundWindow. Other functions you may found useful:
ShowWindow, BringWindowToTop, SetWindowPos