Drag and drop not working in windows 7 if application is launched as administrator with UAC enabled
-
Hello guys, Need some expert advise. I am developing a c# windows application which runs as administrator. The problem is on windows 7 and Vista, drag and drop on the application do not works when UAC is enabled. I researched a lot and found that this is because of UIPI (User Interface Privilege Isolation) and on MSDN I found some information asking to allow the filtered messages again by using ChangeWindowMessageFilter API. I tried it and called it on form_load event some thing like this
private const uint WM_DROPFILES = 0x233; private const uint WM_COPYDATA = 0x004A; private const uint MSGFLT_ADD = 1;
//in form load i calledChangeWindowMessageFilter(WM_DROPFILES, MSGFLT_ADD); ChangeWindowMessageFilter(WM_COPYDATA, MSGFLT_ADD); ChangeWindowMessageFilter(0x0049, MSGFLT_ADD);
But it still dont work.. may be i am missing some thing, I tried to set the property uiAccess="true" also in the manifest file and signed the exe but it still dont work. Am i calling the ChangeWindowMessageFilter incorrectly or is there any another way ? Can any one help me regarding this. I had to run the application as administrator as it modifies some registries Any help would be great Thanks in advance Regardsabhinav