Mr.Parvez Mulla : Thanks for your suggestion . But i used rich text box since i wanted to design my form like a notepad and rich text box would make my program easy.
Instead of using richtextbox you use textbox and set the property of multiline = true; it's easy to use for all code
Thank You all.
just replace the selected text with empty string..