drag and drop problem

i have made a disable drag drop application, the problem is:
when the window got focus then automatically drag the file to the other window, it allows the drag drop.
But on the second drag or more, it can't drag,  it locks, which is good.

I meant, it will only begin the disable drag drop if an explorer folder window has been clicked/activated first.   But if you directly switch from other window then drag the file, it will NOT lock the dragging.

I've used SendKey<escape>, but still can drag,  I got to click first the area of the window before the disable drag drop happens.

what additional code can you recommend?


thank you
LVL 14
systanAsked:
Who is Participating?
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Never tried it sorry.
0
 
Bob LearnedCommented:
That is a confusing description for drag 'n drop operations.  I have no idea what you are working with (Windows Forms, ASP.NET, WPF, ...)...
0
 
systanAuthor Commented:
windows forms
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
Bob LearnedCommented:
If "Information is King", then I am a pauper, since I have very little...
0
 
systanAuthor Commented:
Ok,
Let me try to explain again; These is the scenario.

There are 2 opened windows, my document window and my pictures window

when I click first the area of the window(my documents), then drag a file or folder, it CAN'T be moved.
BUT,
when I switch and drag directly the file or folder of my pictures[without focusing the window]?, the file or folder CAN be drag, and again if I do drag directly, it can be dragged.

But,
when I click first the area of my pictures, then drag a file or folder, it CAN'T be drag now.

It seems WITHOUT focusing/activating the window, it will not follow my disable dragdrop function.


any thoughts?



thanks.
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Can you explain why you need this "specialized" drag and drop in the first place?

Show us some code and we might be able to spot the problem...  =)
0
 
Bob LearnedCommented:
" when I click first the area of the window(my documents), then drag a file or folder, it CAN'T be moved."  Is this expected behavior, or an unexpected condition?
0
 
systanAuthor Commented:
>>Can you explain why you need this "specialized" drag and drop in the first place?
I am doing this, if this is possible to disable drag and drop in windows folders and files
do you have any known software application that disables drag and drop of windows file and folders without the abnormal mouse sensitivity drag configuration?

>>when I click first the area of the window(my documents), then drag a file or folder, it CAN'T be moved.
yes, expected condition, because I command it on the shell to disable drag and drop.
when the file is clicked then drag, it locks(which is good and expected, it can't be drag/moved).

I can only disable drag  and drop when I click first the area of windows,  after clicking the area of windows(outside of files/folders icon of my documents for example) the drag and drop begins to lock(which is good to allow disable drag and drop)

in other words,
it only allows to disable drag and drop if it focuses first the foreground window.

Here's my test, try to open to folders, then try drag and drop, so you will surely understand what is happening to this application.

thanks
dragdropdisabler.exe
0
 
systanAuthor Commented:
What about calling the OleInitialize?
Do you think it helps?
0
 
systanAuthor Commented:
is this task very hard?  the code is impossible?,  please say something so that I can start to stop.
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
I haven't, and won't, run an executable.  Do you have SOURCE I can look at?

So your trying to modify drag and drop operations OUTSIDE your app?  What is the big picture?
0
 
systanAuthor Commented:
I understand.

OUTSIDE your app?
yes

yes i have some source but can't let go, it can't be find else where.

the big picture that this application disables drag and drop of windows.
But, I have to click first the area of windows before the app works fine.

current active window is mypic; if i automate the drag file from mydoc to mypic folder?, it does not lock the file,  but when area of windows(source drag file) clicked/focused first?, the drag file is locked.

I hope OleInitialize can help this out, I've never used it.
0
 
systanAuthor Commented:
has anyone done this before?
0
 
systanAuthor Commented:
Idle_Mind, TheLearnedOne
I have tried it, using the mouse coordinates, and it would result bad action in the form caption.

Haven't you tried disabling drag and drop outside .net application?
or is this really hard and impossible?

0
 
systanAuthor Commented:
I understand,
i hope you have something to say in this post,
http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_27048266.html


thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.