how do you disable the ctrl-C/ctrl-V in

Posted on 2007-08-03
Last Modified: 2013-11-26
In my application I need to disable the cntrl c (copy) and cntrl v (paste) in the richtextbox.
Question by:mk8guy
    LVL 4

    Expert Comment

    may try

    protected overrides sub wndproc(byref m as System.Windows.Forms.Message)
    const WM_COPY = &H301
    const WM_CUT = &H300
    'filter messages
    select case m.Msg
    case WM_COPY, WM_CUT
    MsgBox("u cant do this")
    case else
    end select
    end sub

    or anothe reference for you
    LVL 85

    Accepted Solution

    If you are really using VB.Net 2005, then just set the RTB.ShortcutsEnabled property to False:

            RichTextBox1.ShortcutsEnabled = False

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now