views:

54

answers:

1

I've an app wich alows the user to drag drop images into a picturebox.

It works on xp, it doesn't works on vista and seven since the UAC could cause the problem.

I've tried running it as administrator and still it doesn't work.

A: 

The problem is from the UAC, just as you suspected. What you need to do is not only run your application as administrator, but also run the source program you are dragging from as administrator too. They must both have the same permission/rights in order to drag and drop between the two. So, for example, if the source program is Internet Explorer and its running with user level permissions, but the target is running with administrator, drag and drop will not work.

Hope this helps

icemanind
or run neither as administrator which would be better.
Kate Gregory
Yes Kate, exactly right!
icemanind
Yes, but the aplication writes an db file with sqlite. If i dont gives the app the permissions it doesn't create the db.And...how do you gives the permission from code as you said? Because i want to know that, not how it should be, how itis made.
Sein Kraft
You need to create what is called an Application Manifest. You can learn how to do that here: http://bartdesmet.net/blogs/bart/archive/2006/10/28/Windows-Vista-_2D00_-Demand-UAC-elevation-for-an-application-by-adding-a-manifest-using-mt.exe.aspx
icemanind
I've created the mainfest and still the drag-drop doesn't work.
Sein Kraft