How could I achieve “pin to desktop” effect (i.e immune against “Show Desktop” command) in Win 7, using FindWindow + SetParent approach, or any other approach that would work in XP as well ?
I know I could create a gadget, but I’d like to have backwards compatibility with XP, where I have this code doing it fine:
IntPtr hWnd = FindWindow(null, "Untitled - Notepad");
IntPtr hDesktop = FindWindow("ProgMan", "Program Manager");
SetParent(hWnd, hDesktop);
in my WPF app, I was able to solve it using a timer, it’s working both in XP and Win 7.