?
Solved

drag and drop problem

Posted on 2011-05-11
15
Medium Priority
?
447 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:systan
  • 9
  • 3
  • 3
15 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 35743508
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
 
LVL 14

Author Comment

by:systan
ID: 35743662
windows forms
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 35746691
If "Information is King", then I am a pauper, since I have very little...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Author Comment

by:systan
ID: 35751392
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
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 35751529
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
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 400 total points
ID: 35753874
" 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
 
LVL 14

Author Comment

by:systan
ID: 35755286
>>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
 
LVL 14

Author Comment

by:systan
ID: 35759124
What about calling the OleInitialize?
Do you think it helps?
0
 
LVL 14

Author Comment

by:systan
ID: 35760790
is this task very hard?  the code is impossible?,  please say something so that I can start to stop.
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 35761198
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
 
LVL 14

Author Comment

by:systan
ID: 35761415
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
 
LVL 14

Author Comment

by:systan
ID: 35776005
has anyone done this before?
0
 
LVL 14

Author Comment

by:systan
ID: 35793580
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
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 600 total points
ID: 35793967
Never tried it sorry.
0
 
LVL 14

Author Closing Comment

by:systan
ID: 35794070
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Screencast - Getting to Know the Pipeline
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question