Prevent drag/drop from working between seperate instances of an app?

Microsoft says that any control can accept data from a drag-and-drop operation in progress, and that you can designate a control as a drop zone by setting the AllowDrop property to true. I would think that, if you set AllowDrop to false on those controls that you do not wish to be a drop zone, you should get the desired behavior.

Microsoft says that any control can accept data from a drag-and-drop operation in progress, and that you can designate a control as a drop zone by setting the AllowDrop property to true. I would think that, if you set AllowDrop to false on those controls that you do not wish to be a drop zone, you should get the desired behavior. If you want to detect drag and drop between two instances of your program, you can set an ID in the dragging object (i.e.

Put a GUID in the tag of the control), and check it during the drag process to see if it matches the GUID of your currently running instance. msdn.microsoft.com/en-us/library/ms97384....

You misunderstand what I'm asking. My dragging between DGV1 and DGV2 on my form is permitted in both directions; so I need to have AllowDrop set to true. If I have 2 instances of my app running, dragging from Instance1 to Istance2 is not permitted.

I'm trying to find out how to enforce this. Basically I need a DragSourceIsFromThisProcess() function. – Dan Neely Aug 14 '09 at 15:03 How are you checking it prior to the drop?

If you wait until the drop occurs, isn't it too late? – Robert Harvey? Aug 14 '09 at 15:46 I'm calling DoDragDrop via a dynamically loaded MouseMove event (only active when the left button is depressed); so I can set the flag then.

The DragEnter event fires after the drag has begun so I don't think there's any way it could happen out of sequence. – Dan Neely Aug 14 '09 at 15:49 OK, that's what I thought. I'll edit in the answer.

– Robert Harvey? Aug 14 '09 at 16:04.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions