Forcément, pour faire une minimisation, je me suis tout de suite tourné vers Form.WindowState. Et forcément, le compact framework ne supporte que les états Maximized et Normal :).
Donc on va une fois de plus faire un petit peu d'interop:
[DllImport("coredll.dll")]
static extern int ShowWindow(IntPtr hWnd, int nCmdShow);
const int SW_MINIMIZED = 6;
private void HideForTrue()
{
ShowWindow(this.Handle, SW_MINIMIZED);
}
C'est pas bien compliqué, ca fait juste appel à une fonction Win32 très classique.
.Net, Windows Mobile