Si je vous comprends bien et que vous voulez tirer sur le bureau, au fond, cela pourrait aider: http://www.neowin.net/forum/lofiversion/index.php/t293883.html
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern IntPtr FindWindow(
[MarshalAs(UnmanagedType.LPTStr)] string lpClassName,
[MarshalAs(UnmanagedType.LPTStr)] string lpWindowName);
[DllImport("user32.dll")]
public static extern IntPtr SetParent(
IntPtr hWndChild, // handle to window
IntPtr hWndNewParent // new parent window
);
IntPtr hwndf = this.Handle;
IntPtr hwndParent = FindWindow("ProgMan", null);
SetParent(hwndf,hwndParent);
this.TopMost = false;
Ce serait reparenter votre formulaire en tant que fenêtre enfant du bureau lui-même.
Après avoir lu le code quelques fois de plus je ne sais pas pourquoi ils utilisent FindWindow() à la recherche de « ProgMan » au lieu d'utiliser
[DllImport("user32.dll")]
static extern IntPtr GetDesktopWindow();
mais je ne lui donne pas moi-même essayer jusqu'à présent.
Pourquoi ne pourrait-il pas être quelque chose d'aussi facile que cela. OnDesktop: P merci, a travaillé comme un charme – Ozzy