Some event catch questions

Q1:
How do I set “model modified flag”?
If model be modified, Rhino will popup save file dialog when closing Rhino.

Q2:
How do I catch mouse drag event on Rhino?
I want to do something when mesh object be dragged away.

Thank you.

Q1: RhinoDoc.ActiveDoc.Modified = true;

Q2: this is not so easy to catch the dragging event. But, when an object is moved from one position to another, the events RhinoDoc.ReplaceRhinoObject, RhinoDoc.DeleteRhinoObject and RhinoDoc.AddRhinObject are all raised. Because moving an object is actually replacing the object at the old position with the object at the new position. Maybe this is what you want?

Thank for your help.
I will try it.