CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2000
    Posts
    9

    RichTextBox in VB6

    The new RichTextBox control with VB6 seems to have built in cut/copy/paste functions. i'm builting a new control which extends the richtextbox, and i want to write my own cut/copy/paste functions... but i can't find a way to disable the built-in ones. please help.


  2. #2
    Join Date
    Apr 2000
    Posts
    7

    Re: RichTextBox in VB6

    Of course you can do that. Under the richtextbox's keydown event you can write the code like this:

    if shift=2 then'shift=2 that is ctrl pressed
    select case keycode
    Case vbKeyZ
    'your undo event
    Case vbKeyX
    'your cut event
    Case vbKeyV
    'you paste event and other events if you wish to write
    end select
    keycode=0 'this disable the keycode sending to the richtextbox



    now you can get the right evnet in it. But there's a problem, you have to write all events if you defined any other hotkeys with a CTRL press.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured