SetWindowPos returns Access Denied

╄→гoц情女王★ 提交于 2019-12-11 02:48:56

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!