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. Backspace key on RichtextEditor

Backspace key on RichtextEditor

Scheduled Pinned Locked Moved C#
help
2 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.
  • A Offline
    A Offline
    AB7771
    wrote on last edited by
    #1

    Hi all, i have a richtext editor where the user is allowed to enter text Now i want to trap the Vscroll event of the Rictext and here i want to execute the sendmessage and pass the backspace key in the parameter i want to delete the last "\n" character in the Richtext editor any help or pointer in this case will be appreciated Thanks and Regards Pramod

    J 1 Reply Last reply
    0
    • A AB7771

      Hi all, i have a richtext editor where the user is allowed to enter text Now i want to trap the Vscroll event of the Rictext and here i want to execute the sendmessage and pass the backspace key in the parameter i want to delete the last "\n" character in the Richtext editor any help or pointer in this case will be appreciated Thanks and Regards Pramod

      J Offline
      J Offline
      Jupiter9
      wrote on last edited by
      #2

      You can trap in the wndproc of the control. But you need to get the wndproc of the control, not the parent form. Try the following code to grab the event: class RichTextBoxEx : System.Windows.Forms.RichTextBox { private const int WM_VSCROLL = 0x0115; protected override void WndProc(ref System.Windows.Forms.Message m) { if (m.Msg == WM_VSCROLL) System.Diagnostics.Debug.WriteLine("vertical scroll"); base.WndProc(ref m); } }

      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