473,387 Members | 1,724 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,387 software developers and data experts.

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 3562
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.*****@comcast.netwrote in message
news:OF**************@TK2MSFTNGP06.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.nospamwrote in message
news:%2****************@TK2MSFTNGP02.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.*****@comcast.netwrote in message
news:OF**************@TK2MSFTNGP06.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.*****@comcast.netwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
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.nospamwrote in message
news:%2****************@TK2MSFTNGP02.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.*****@comcast.netwrote in message
news:OF**************@TK2MSFTNGP06.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@localhostwrote in message
news:ef*************@TK2MSFTNGP06.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.*****@comcast.netwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
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.nospamwrote in message
news:%2****************@TK2MSFTNGP02.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.*****@comcast.netwrote in message
news:OF**************@TK2MSFTNGP06.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**********@pleasespamme.comwrote in message
news:ek*************@TK2MSFTNGP03.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@localhostwrote in message
news:ef*************@TK2MSFTNGP06.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.*****@comcast.netwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl. ..
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.nospamwrote in message
news:%2****************@TK2MSFTNGP02.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.*****@comcast.netwrote in message
news:OF**************@TK2MSFTNGP06.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.contextmenu = 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
contextmenustrip. And then I can have the cut, copy, and paste operations
do what I need it to do.

Thanks

Steve

"Newbie Coder" <ne**********@pleasespamme.comwrote in message
news:eS**************@TK2MSFTNGP04.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.contextmenu = 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
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...
3
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...
12
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...
13
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...
3
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...
25
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...
4
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...
3
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...
5
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...
8
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I disable the right mouse button? -----------------------------------------------------------------------...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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,...
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...

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.