Dragging the image in RichTextBox ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If an image is inserted in the RichTextBox at runtime, how to drag/move it
inside the RichTextBox with the help of mouse, just like we can move any
control on the form during design time.
Please guide
 
sachin,

This would be rather hard, as you would not be able to indicate that it
is moving while you dragged it. The best you could do is detect when the
mouse button is pressed down (I don't even know if you can determine if what
is under the mouse is a picture) and then programattically re-insert the
picture when the mouse button is let up.

It sounds like you want to create an editor of some kind. Have you
given some thought to the edit mode of MSHTML? It would probably suit your
needs better.

Hope this helps.
 
Back
Top