The code I'm using to call the Windows Start Menu is quite simple (C#):
IntPtr StartMenuHandle = (IntPtr)Pinvoke.Win32.FindWindow("DV2ControlHost", null);
IntPtr taskBarWnd = (IntPtr)Pinvoke.Win32.FindWindow("Shell_TrayWnd", null);
IntPtr startWnd = Pinvoke.Win32.FindWindowEx(taskBarWnd, IntPtr.Zero, "Button", "Start");
Pinvoke.Win32.SetWindowPos(taskBarWnd, IntPtr.Zero, 0, 0, 0, 0, Pinvoke.Win32.SWP_NOSIZE | Pinvoke.Win32.SWP_SHOWWINDOW |
Pinvoke.Win32.SWP_NOMOVE);
Pinvoke.Win32.SetWindowPos(startWnd, IntPtr.Zero, 0, 0, 0, 0, Pinvoke.Win32.SWP_NOSIZE | Pinvoke.Win32.SWP_SHOWWINDOW |
Pinvoke.Win32.SWP_NOMOVE);
Pinvoke.Win32.SetWindowPos(StartMenuHandle, IntPtr.Zero, StartMenuBestPos.X, StartMenuBestPos.Y, 0, 0, Pinvoke.Win32.SWP_NOSIZE |
Pinvoke.Win32.SWP_SHOWWINDOW);
The StartMenuHandle is the handle to the start menu itself and the other handles are for the start button and the taskbar. I think this may actually be a bug with Windows itself. Any thoughts or solutions?









Logged



). Still can't get it over 50% CPU however much I move it; seems pretty reasonable on resource use.