Hi guys, im trying to make a program that when you press a button it shows the start menu in a certain screen position.
I know I can do something like this:
But i cant specify where for the start menu to show. So my next thought was to use the SetWindowPos API like this:
Now that works and i can put it where i want, except unless i use
first then the mouseover effects dont seem to show, and if i do use the above code first then it causes the startmenu to flash in the original location first. So my question is, does anyone have any idea of how i could solve the mouseover effects not working or even better have a proper method for showing the startmenu in a specified place.
Thanks, Dan
EDIT: maybe this would be better in the interop section?
I know I can do something like this:
Code:
SendMessage(StartMenuHandle, WM_SYSCOMMAND, SC_TASKLIST, 0)
But i cant specify where for the start menu to show. So my next thought was to use the SetWindowPos API like this:
Code:
SetWindowPos(StartMenuHandle, HWND_TOP, 0, 0, r.Width, r.Height, SWP_SHOWWINDOW) r is the startmenu rectangle from using GetWindowRect
Now that works and i can put it where i want, except unless i use
Code:
SendMessage(StartMenuHandle, WM_SYSCOMMAND, SC_TASKLIST, 0)
first then the mouseover effects dont seem to show, and if i do use the above code first then it causes the startmenu to flash in the original location first. So my question is, does anyone have any idea of how i could solve the mouseover effects not working or even better have a proper method for showing the startmenu in a specified place.
Thanks, Dan
EDIT: maybe this would be better in the interop section?