473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Disable right click menu

On textboxes when you right click the mouse button a menu will pop-up
with undo,cut,copy,paste,delete,select all. How can i disable the menu
so when i right click on the textbox no menu will pop-up?
Thank you very much.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
3 5979
Hi,

Dim cm As New ContextMenu

TextBox1.ContextMenu = cm

Ken

-----------------

"Ryan Joseph So" <ac***********@hotmail.com> wrote in message
news:O0**************@tk2msftngp13.phx.gbl...
On textboxes when you right click the mouse button a menu will pop-up
with undo,cut,copy,paste,delete,select all. How can i disable the menu
so when i right click on the textbox no menu will pop-up?
Thank you very much.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #2
* Ryan Joseph So <ac***********@hotmail.com> scripsit:
On textboxes when you right click the mouse button a menu will pop-up
with undo,cut,copy,paste,delete,select all. How can i disable the menu
so when i right click on the textbox no menu will pop-up?


Create an "empty" context menu and assign it to the control's
'ContextMenu' property.

- or -

Override the control's 'WndProc' and listen for 'WM_CONTEXTMENU' (and
"eat" it).

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Ryan Joseph So <ac***********@hotmail.com> wrote in message news:<O0**************@tk2msftngp13.phx.gbl>...
On textboxes when you right click the mouse button a menu will pop-up
with undo,cut,copy,paste,delete,select all. How can i disable the menu
so when i right click on the textbox no menu will pop-up?
Thank you very much.


What you are really asking is "How can I piss off my visitors by fucking
with their web browsers?".When I come on a site like that, I immediately
turn off Java script, and save all of their pages and images that they
wanted to "protect" me from saving, just as a way of saying "fuck you" to
the webmaster.
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: yaktipper | last post by:
This explains how to disable the view source / right-click menu in Netscape 4, Netscape 6 and Internet Explorer (IE). <script language="JavaScript"> //This code is the beginning of the right...
4
by: Lijun Yang | last post by:
Hey, I am able to disable the right mouse button on images for netscape and IE but it won't work for Opera. Here is the code: // start of the code var clickmessage="Sorry, you don't have...
6
by: nntp | last post by:
I have a set of links which I want search engines to crawl them, but I want to disable them from my visitors, so I will ask the link owners to pay me to let me enable them. <a disabled...
29
by: lori3laz | last post by:
How do you disable the right click>view source option on web pages so people can't view your coding and copy it? What's the html I need to include in my website to utilize this feature? Thank...
8
by: Ken Yu | last post by:
Hi, How can i disable "RightClick Menu" in Internet Explorer, when access the frontpage ? tks a lot ! Ken
16
by: MLH | last post by:
If I give someone a runtime app, they can open the database window by pressing the F-11 key. How to prevent???
4
by: marcnz | last post by:
Hi, I am working for a company which as a MS SQL backend and Access as front end. We update automatically each access db on the user local machine when a new feature has become available. We...
8
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I disable the right mouse button? -----------------------------------------------------------------------...
5
by: neehakale | last post by:
language using: C#. platform for program: WINDOWS FORM I wnt to disable the right click for text boxes.And also want to diable the context menu. I have already disable the Minimize and...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.