问题
I'am building app that helps taking screenshots of selected windows. I'am displaying semi-transparent form over selected window. I'am using winapi in this case.
[DllImport("user32.dll", SetLastError = true)]
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter,
int X, int Y, int cx, int cy, int uFlags);
First parameter is handle to transparent form, to second I'am passing handle to selected window. Everything working just fine except one thing. When selected window is running with Administrator privileges I'am getting error "Access denied"
. Ofcourse, my app is running without administrator privileges and it need to stay that way.
Do you have any ideas how to fix this?
来源:https://stackoverflow.com/questions/29142491/setwindowpos-returns-access-denied