Undo And Select All
-
i am developing a c# window application in which i have to give a functionality of Undo And SelectAll.how can we do this i have a MDI parent form and lots of MDI children In MDI parent form.Through MDI parent form i want to control this.
-
And also i have to give the functionality of cut copy paste ...i have the code but its not working inside the Group box or panel... can u modified it .. Private StringBuilder sb=null private void CutCopyPaste(bool Cut, bool Copy, bool Paste) { foreach (Form f in this.MdiChildren) { if (f.ContainsFocus) { foreach (Control c in f.Controls) { if (c.Focused) { if (c.GetType() != typeof(Label)) { if (Cut) { sb.Append(c.Text); c.Text = ""; } else if (Copy) sb.Append(c.Text); else if (Paste) c.Text = sb.ToString(); break; } } } } } } private void copyToolStripMenuItem_Click(object sender, EventArgs e) { try { sb = null; sb = new StringBuilder(); CutCopyPaste(false, true, false); } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void pasteToolStripMenuItem_Click(object sender, EventArgs e) { try { if (sb != null) CutCopyPaste(false, false, true); } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void cutToolStripMenuItem_Click(object sender, EventArgs e) { try { sb = null; sb = new StringBuilder(); CutCopyPaste(true, false, false); } catch (Exception ex) { MessageBox.Show(ex.Message); } }