c# - Is there a way to ask about the status of a drag operation while it is in progress? -


I know that when a drag / drop operation is complete, after receiving the mouseup or ASK key event, This gives an NAM indicates what happened (move, copy, none, etc.) My question is this: is there a way to return status information to the situation / control, which started drag event, while Running?

The use case is as follows (Visual Studio-ASK Layout Manager for all of this): I am writing a layout / window management component which allows to draw areas of layout around. I use a transparent form to paint a semi-transparent overlay which depends on where the mouse is dragging, a preview preview overlay that appears when dragging windows in Visual Studio.

Another motivation is that the processing of the serialization process is relatively intensive, and I would not like to do this if dragging is to occur within the same process / window. Therefore, if there is a real "drop" in any other way, then it was only a method of serializing, which would probably make all the difference in applicability.

What I have to do, is able to drag between different windows or even different instances of the application. I have already excluded the serialization code and everything, but the point is that when I pull a piece of layout in another window, there is no way to know that in the first window the mouse is now at another frequency The application, which is more than capable of painting its own overlay, so the original overlay hangs like an idiot and my program looks like crap.

Do I have to go through any kind of callback or have a message or property that I can listen to / during a drag operation which will tell me whether my mouse pointer is more than the area, which Can I accept his data? Please do not listen to the incident for me changing the cursor, I have already lost too much self esteem with reflection to pull the difference between strange wpf / winforms. If someone can suggest a clear resolution for this problem, I would be very grateful.

In addition to this, if someone can tell me about any favorite site that tells how to drag and drop with realistic talk of playful, it will be appreciated, as I found There is actually a lack of nitty gritty information available about pulling. Normal things like custom cursor and choice are fine, but I'm probably more interested in Win32 black art and likes.

UPDATE: Actually I came to know about GiveFeedback events only a second before, came back to my question, and there it was. Big face moment though, as I have found you here, what about my second question: Is there any way to load information only when it faces a legitimate goal? Can I apply my idaobect by somehow or martial things, when the mouse leaves the form? GiveFeedback does not give me a valid goal under the cursor only, but I do not give it to change how the data is being dragged ...

Another update: whether the source of the drag Is there any way to determine the operation? That is, when my control receives the dragenter message, how can I say that the source of drag is my own control or foreigner? I know that I can freshly mess it up with AllowedEffects property, but is there any more direct way?

GiveFeedback View event (a good article) - which really After you have me, I think.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -