Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Undo And Select All

Undo And Select All

Scheduled Pinned Locked Moved C#
csharp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rahul DSG
    wrote on last edited by
    #1

    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.

    L 1 Reply Last reply
    0
    • R Rahul DSG

      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.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      A simple framework for adding undo/redo support[^]

      R 2 Replies Last reply
      0
      • L Lost User

        A simple framework for adding undo/redo support[^]

        R Offline
        R Offline
        Rahul DSG
        wrote on last edited by
        #3

        And for Select All...

        1 Reply Last reply
        0
        • L Lost User

          A simple framework for adding undo/redo support[^]

          R Offline
          R Offline
          Rahul DSG
          wrote on last edited by
          #4

          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); } }

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups