473,795 Members | 2,766 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mouse right click

How do you disable the mouse right click to prevent pop-up window?

Or if I want to have cut/copy/paste on pop-up window use same code as my
custom cut/copy/paste that are triggered by toolstrip buttons?

Thanks

Steve
Dec 22 '06 #1
7 3599
This is not done with server-side code since the mouse clicks originate at
the client.

Use JavaScript and the onMouseDown client-side event handler to accomplish
this.

"Steve" <s.*****@comcas t.netwrote in message
news:OF******** ******@TK2MSFTN GP06.phx.gbl...
How do you disable the mouse right click to prevent pop-up window?

Or if I want to have cut/copy/paste on pop-up window use same code as my
custom cut/copy/paste that are triggered by toolstrip buttons?

Thanks

Steve


Dec 22 '06 #2
Hi Scott...

This is for a client application and I'm only coding in vb 2005. Isn't
there a way to intercept the right mouse down event and cancel it?

Steve

"Scott M." <s-***@nospam.nosp amwrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
This is not done with server-side code since the mouse clicks originate at
the client.

Use JavaScript and the onMouseDown client-side event handler to accomplish
this.

"Steve" <s.*****@comcas t.netwrote in message
news:OF******** ******@TK2MSFTN GP06.phx.gbl...
How do you disable the mouse right click to prevent pop-up window?

Or if I want to have cut/copy/paste on pop-up window use same code as my
custom cut/copy/paste that are triggered by toolstrip buttons?

Thanks

Steve


Dec 22 '06 #3
The MouseUp event is the one you want.

The information about which mouse button was used and the ability to cancel
it is available in the event arguments.
"Steve" <s.*****@comcas t.netwrote in message
news:%2******** **********@TK2M SFTNGP03.phx.gb l...
Hi Scott...

This is for a client application and I'm only coding in vb 2005. Isn't
there a way to intercept the right mouse down event and cancel it?

Steve

"Scott M." <s-***@nospam.nosp amwrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>This is not done with server-side code since the mouse clicks originate
at
the client.

Use JavaScript and the onMouseDown client-side event handler to
accomplish
this.

"Steve" <s.*****@comcas t.netwrote in message
news:OF******* *******@TK2MSFT NGP06.phx.gbl.. .
How do you disable the mouse right click to prevent pop-up window?

Or if I want to have cut/copy/paste on pop-up window use same code as
my
custom cut/copy/paste that are triggered by toolstrip buttons?

Thanks

Steve




Dec 22 '06 #4
Try any of these:

http://www.google.co.uk/search?hl=en...e+Search&meta=

I hope this helps,

Newbie Coder

"Stephany Young" <noone@localhos twrote in message
news:ef******** *****@TK2MSFTNG P06.phx.gbl...
The MouseUp event is the one you want.

The information about which mouse button was used and the ability to
cancel
it is available in the event arguments.
"Steve" <s.*****@comcas t.netwrote in message
news:%2******** **********@TK2M SFTNGP03.phx.gb l...
Hi Scott...

This is for a client application and I'm only coding in vb 2005. Isn't
there a way to intercept the right mouse down event and cancel it?

Steve

"Scott M." <s-***@nospam.nosp amwrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
This is not done with server-side code since the mouse clicks originate
at
the client.

Use JavaScript and the onMouseDown client-side event handler to
accomplish
this.

"Steve" <s.*****@comcas t.netwrote in message
news:OF******** ******@TK2MSFTN GP06.phx.gbl...
How do you disable the mouse right click to prevent pop-up window?

Or if I want to have cut/copy/paste on pop-up window use same code as
my
custom cut/copy/paste that are triggered by toolstrip buttons?

Thanks

Steve





Dec 22 '06 #5
Why would a link to a search on JavaScript help?

The OP has made it clear that he is working on a Windows Forms application
using VB.NET.

I hope you realise that you have just perpetuated the 'heinous sin' that, a
couple of days ago, you roundly criticised others for doing.
"Newbie Coder" <ne**********@p leasespamme.com wrote in message
news:ek******** *****@TK2MSFTNG P03.phx.gbl...
Try any of these:

http://www.google.co.uk/search?hl=en...e+Search&meta=

I hope this helps,

Newbie Coder

"Stephany Young" <noone@localhos twrote in message
news:ef******** *****@TK2MSFTNG P06.phx.gbl...
>The MouseUp event is the one you want.

The information about which mouse button was used and the ability to
cancel
>it is available in the event arguments.
"Steve" <s.*****@comcas t.netwrote in message
news:%2******* ***********@TK2 MSFTNGP03.phx.g bl...
Hi Scott...

This is for a client application and I'm only coding in vb 2005. Isn't
there a way to intercept the right mouse down event and cancel it?

Steve

"Scott M." <s-***@nospam.nosp amwrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
This is not done with server-side code since the mouse clicks
originate
at
the client.

Use JavaScript and the onMouseDown client-side event handler to
accomplish
this.

"Steve" <s.*****@comcas t.netwrote in message
news:OF******* *******@TK2MSFT NGP06.phx.gbl.. .
How do you disable the mouse right click to prevent pop-up window?

Or if I want to have cut/copy/paste on pop-up window use same code
as
my
custom cut/copy/paste that are triggered by toolstrip buttons?

Thanks

Steve




Dec 22 '06 #6
One of the lasts posts mentioned using Javascript, Stephany. Besides, I
cannot see you being much good. See Scott's post below & my advice under:

=============== =============== ===
Scott's Post:

This is not done with server-side code since the mouse clicks originate at
the client.

Use JavaScript and the onMouseDown client-side event handler to accomplish
this.

=============== =============== ====

You can just say

if e.button = 2 then
messabgox.show( "Disabled")
end if

You can also subclass a standard textbox to remove the context menu items
you wish, but it you use CTRL + C... then its not always good

But I had the same thing many years ago in a windows app & it was handled in
WndProc with the subclassing as mentioned above

There is always that you create a blank context menu & add that to the
textbox

textbox1.contex tmenu = contextmenu1...

That way when you right-click you get nothing

I have deleted the subclassing removing the paste/copy items now so I cannot
pass it on - sorry

I hope this has given you some ideas,

Newbie Coder
Dec 22 '06 #7
Actually what I ended up doing was substituting my own menu of options using
contextmenustri p. And then I can have the cut, copy, and paste operations
do what I need it to do.

Thanks

Steve

"Newbie Coder" <ne**********@p leasespamme.com wrote in message
news:eS******** ******@TK2MSFTN GP04.phx.gbl...
One of the lasts posts mentioned using Javascript, Stephany. Besides, I
cannot see you being much good. See Scott's post below & my advice under:

=============== =============== ===
Scott's Post:

This is not done with server-side code since the mouse clicks originate at
the client.

Use JavaScript and the onMouseDown client-side event handler to accomplish
this.

=============== =============== ====

You can just say

if e.button = 2 then
messabgox.show( "Disabled")
end if

You can also subclass a standard textbox to remove the context menu items
you wish, but it you use CTRL + C... then its not always good

But I had the same thing many years ago in a windows app & it was handled
in
WndProc with the subclassing as mentioned above

There is always that you create a blank context menu & add that to the
textbox

textbox1.contex tmenu = contextmenu1...

That way when you right-click you get nothing

I have deleted the subclassing removing the paste/copy items now so I
cannot
pass it on - sorry

I hope this has given you some ideas,

Newbie Coder


Dec 22 '06 #8

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

Similar topics

5
6230
by: John Champaign | last post by:
Hi all, I'm working on an educational applet for a child with special needs. He's got a bit of a trick to make my life more difficult... To interact with the applet he needs to click on buttons, which is fine most of the time (he comes from a Mac environment, so I accept mouse clicks from the right or left button when he's working on the PC). But every once in a while, he'll press and hold the right mouse button, move onto a JButton,...
3
3610
by: mitsura | last post by:
Hi, I have included a small listing. The test program opens a panel and show a bitmap. What I want is to when the mouse is over the bitmap panel, I want to trap the left mouse click. The purpose is to get the position of the mouse pointer on the bitmap. However, for some reason, the left (I also tried right) mouse clicks are not intercepted. I new to Python and wxWindows so any help would be greatly appreciated.
12
18340
by: mdb | last post by:
My app has a notify icon in the systray. I want the left mouse click to initiate a menu, and a right-mouse click to do something else. Normally, for a button, I would listen to MouseDown and if I need to display the menu, I would contextMenu.Show(buttonCtrl, new Point(0)). But I can't do this for a notifyIcon because notifyIcons aren't controls. How can I display a contextMenu where the cursor is by command only? -mdb
13
2312
by: James Bond | last post by:
Hello. My 80+ year old father has recently decided to get his first computer. Due to his age (and I suspect lack of playing pong as a child like I did) he lacks the manual dexterity to use a mouse well. He is frequently missing the left mouse button and hitting the right, or less often the middle (wheel) buttons. While he is very slowly getting better with practice, the frustration level is high for him as a result of this (he gets very...
3
2076
by: jcrouse | last post by:
I have created a form designer type application (with a lot of you peoples helpJ). It has label controls that are draggable at runtime. The user is also allowed to change some properties such as forecolor, backcolor and font. The labels also are rotatable and the text can also be flipped 180 degrees (the flipped text part is still being worked on). I have one context menu for all 30 labels that allows for the property changes to the labels....
25
2713
by: Romanise | last post by:
An LCD monitor with keyboard and mouse capabilities on it, thinnest possible, to hang on rack-door can be a boon for expensive spaces of datawarehouses. Has anyone come across one? Maybe someone would go into manufacturing it. £800 Dell product I am told occupies equivalent of two server space in a rack.
4
10853
by: Pucca | last post by:
How can I tell a mouse right clicks over a listview item that's in a container panel. I only want to display a popup menu if the user right click the mouse over an item on the Listview. I don't not want to display this menu if a node selected on the listview but user right click over the empty space of the panel that contain the listview. The problem here is when I use the Listview's Click Event, I don't have ways to verify if the...
3
3769
by: Morten Snedker | last post by:
If I have a number of random applications open, move the mouse cursor to a given position and do a click, the application gets the focus. That is what this simple code should illustrate: Dim pt As Point Dim wnd As IntPtr Const WM_LBUTTONUP = &H202 '//LButton up Const WM_LBUTTONDOWN = &H201 '//LButton down
5
574
by: Adeel | last post by:
Hi group! I'm trying to learn C# on my own... I'd appreciate it very much if someone can help me out here. I have a basic form without any controls on it... I want to catch mouse clicks (both left and right). When I select the form and go to the events tab (the bolt icon in properties), it gives me several options to choose from...
8
3730
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I disable the right mouse button? ----------------------------------------------------------------------- The oncontextmenu intrinsic event is the only safe and reliable method. Of the other approaches often presented, most depend on an alert box interrupting the process and rarely work. Note that oncontextmenu is a non-standard event and is not...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10436
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10213
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9040
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3722
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.