I was trying to create a form similar to notepad using rich text box . when I selected a part of text and try to delete it using richtextbox1.delete(); command the entire text was getting deleted . I tried using richtextbox1.selectedtext.remove(); it dint work. please help.