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

c# Catching rightmouseclick (application independent)

Hi everyone,

I want to build a solution that is listening to rightmouseclicks of a selected text (application independent). Once clicked there should appear something similar to "Cut" or "Copy" ("Analyze text"-in my case-) in the menu.
I want to catch the action (menu item clicked) and the selected text and do something with it and than show a messagebox or something.

Does somebody know how to do this?
Feb 29 '08 #1
3 1226
Plater
7,872 Expert 4TB
Well context menus were built to do just that, so you could use one of those.
You could also put an event handler on the mouse click event.
Feb 29 '08 #2
Well context menus were built to do just that, so you could use one of those.
You could also put an event handler on the mouse click event.
Ok, but I want to access the context menu from outside my application. So, lets say that someone using my application right clicks on a selected text in some application (Internet Explorer, or Word), I want to put my menu item in that context menu.
Is that possible?
Mar 3 '08 #3
Plater
7,872 Expert 4TB
Hmm, yes because I have installed programs that do just that. I don't think it possible to do it without using win32 API (I think there is some registry business there too)
I do know that the SendTo-> menu is rather easy to get your program in though.

But yes, for custom functionality I think you need to look up win32 api codes for it.
Mar 3 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Steven Reddie | last post by:
I understand that access violations aren't part of the standard C++ exception handling support. On Windows, a particular MSVC compiler option enables Microsoft's Structured Exception Handling...
7
by: cmay | last post by:
FxCop complains every time I catch System.Exception. I don't see the value in trying to catch every possible exception type (or even figuring out what exceptions can be caught) by a given block...
7
by: Pavils Jurjans | last post by:
Hello, I wanted to get some light in the subject. As I develop ASP.NET applications, it's necessary to understand how exactly the server- communication happens. It seems like initially...
1
by: newdev | last post by:
Hi All, Can somebody maybe please help me? - how do i screen scrape data from a dos application / window to .net application by using c#? - how do i screen scrape data from a dos application /...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.