CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    5

    disable default righ click menu on txtbox

    How do you stop the default right click menu appearing on a textbox control.

    I'm trying to use a Magic PopupMenu and now the magic popup and now both the magic menu and the default (cut, copy, paste, delete, select all) menu appear at the same time.

    http://www.dotnetmagic.com/index.html

    Russ

  2. #2
    Join Date
    Jan 2003
    Posts
    5
    You can derive your textbox and override WndProc ignoring right button down.

    Public Class MyTextBox
    Inherits TextBox

    Protected Overrides Sub WndProc(ByRef m As
    System.Windows.Forms.Message)
    If m.Msg = &H204 Then ' WM_RBUTTONDOWN
    Return 'ignore it
    End If
    MyBase.WndProc(m)
    End Sub 'WndProc
    End Class 'MyTextBox

  3. #3
    Join Date
    Jun 2003
    Location
    India
    Posts
    1

    Exclamation another question

    On right click of mouse pop up menu appears, How to disable to paste/ cut/ item from that pop up menu?


    regards
    -Amrendra

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