14 Replies - 1850 Views - Last Post: 26 May 2013 - 09:18 PM Rate Topic: -----

#1 asyranok   User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 38
  • Joined: 19-May 13

How to add new options to the right-click menu?

Posted 25 May 2013 - 09:23 PM

How does one approach adding a new option to the right-click mouse menu? I would want this option to be available as universally as possible for a user when they have run my program, and chosen to activate this functionality.

This way, below Cut, Copy, Paste, Delete, there will be another option that opens several choices.

Thanks for any and all help!
Is This A Good Question/Topic? 0
  • +

Replies To: How to add new options to the right-click menu?

#2 qwertyuu   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 66
  • Joined: 31-July 12

Re: How to add new options to the right-click menu?

Posted 25 May 2013 - 09:50 PM

There you go!
Was This Post Helpful? 0
  • +
  • -

#3 asyranok   User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 38
  • Joined: 19-May 13

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 08:49 AM

I'm amused that you think google-ing it wasn't my first course of action. I googled the topic enough to make a reasonable person's eyes bleed and I cannot find the answer. All of the information out there is about context menus in specific programs, rather than the operating system's context menu.

Does anyone know how to do this?
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6819
  • View blog
  • Posts: 28,246
  • Joined: 12-December 12

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 10:34 AM

Quote

I googled the topic enough to make a reasonable person's eyes bleed and I cannot find the answer.

I do not belief this hyperbole for a moment :whistling:

You need to dig into the Registry and understand Verbs. MSDN reference

Quote

If you register on one of the following registry key entries, then exercise caution and be sure to register your handler on the most specific type to reduce the possibly unintended consequences:
HKEY_CLASSES_ROOT\*
HKEY_CLASSES_ROOT\AllFileSystemObjects
HKEY_CLASSES_ROOT\Folder
HKEY_CLASSES_ROOT\Directory

It will be very difficult, and probably dangerous, to make a universal shortcut menu item. As we know, most applications have their own shortcut menu(s), as does the Desktop, Taskbar and Start button, etc.

MSDN: The Registry Class

This post has been edited by andrewsw: 26 May 2013 - 10:30 AM

Was This Post Helpful? 1
  • +
  • -

#5 asyranok   User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 38
  • Joined: 19-May 13

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 12:13 PM

Thanks for that information! I suppose that I only need it to be universal when clicking in a text box. So I want to make another "paste" function essentially, but instead of pasting from the clip board, something from files in the user's hard drive will be pasted instead.

Would that greatly simplify matters, since it is not truly universal?
Was This Post Helpful? 0
  • +
  • -

#6 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6819
  • View blog
  • Posts: 28,246
  • Joined: 12-December 12

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 12:16 PM

View Postasyranok, on 26 May 2013 - 07:13 PM, said:

Thanks for that information! I suppose that I only need it to be universal when clicking in a text box.

What text box? Or, what text boxes?
Was This Post Helpful? 0
  • +
  • -

#7 asyranok   User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 38
  • Joined: 19-May 13

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 12:22 PM

View Postandrewsw, on 26 May 2013 - 12:16 PM, said:

View Postasyranok, on 26 May 2013 - 07:13 PM, said:

Thanks for that information! I suppose that I only need it to be universal when clicking in a text box.

What text box? Or, what text boxes?

Essentially, any field that allows a user to type in. My ultimate goal is to add functionality to a program I made that generates and stores passwords for a user. I want to add functionality that will allow me to right-click in the username field for any account on any website - from there, I will select "Username" from the context menu, and that will bring a list up of all available "Account" data stored on this computer.

From there, I select the account, for example, my email username/address. It will then paste that into my username field for my email. Then, I could right click the password field, and choose "Password". Again, a list of accounts will appear in the slide out menu, where I choose "Email" again. This time, the saved password is pasted into the field.
Was This Post Helpful? 0
  • +
  • -

#8 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6819
  • View blog
  • Posts: 28,246
  • Joined: 12-December 12

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 12:31 PM

This is even more specific. I assume it is possible to add to the context-menu for ALL browsers (and possibly all their various versions?!) but then you want to detect whether what they are right-clicking on is a textbox? That is, a form-input of some kind?

What's wrong with copy & paste? he, he!

Good luck!
Was This Post Helpful? 0
  • +
  • -

#9 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6819
  • View blog
  • Posts: 28,246
  • Joined: 12-December 12

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 01:04 PM

You might consider universal keyboard shortcuts.

This post has been edited by andrewsw: 26 May 2013 - 01:06 PM

Was This Post Helpful? 0
  • +
  • -

#10 asyranok   User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 38
  • Joined: 19-May 13

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 01:18 PM

View Postandrewsw, on 26 May 2013 - 01:04 PM, said:

You might consider universal keyboard shortcuts.



Well, the copy and paste is fine, but you have to go into your folder to copy and paste something. I wanted to cut out the middle man if possible.

With a shortcut, do you mean I can bring up a small menu to do the same thing? Because I would need to bring up options that can be selected, which results in pasting of some data.
Was This Post Helpful? 0
  • +
  • -

#11 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6819
  • View blog
  • Posts: 28,246
  • Joined: 12-December 12

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 01:35 PM

I believe that we can create universal shortcut keys in Windows, that work across all (or most) applications. So you might be in a textbox and press one of your shortcuts to paste different items.

A universal keyboard shortcut could activate a form that you've designed, but this would take focus away from the textbox.

I believe all this is possible but I haven't attempted it myself.

Good luck.

Speculating further, you could have a shortcut that produces your form. Then click a button which puts something into the clipboard. This also closes the form, returning focus to the textbox where they could use Paste.

But I do not know how complicated this might be.
Was This Post Helpful? 0
  • +
  • -

#12 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6819
  • View blog
  • Posts: 28,246
  • Joined: 12-December 12

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 01:47 PM

However, I think you need to bear in mind that a lot of modern browsers already have the facility to recall entered usernames, appearing in auto-complete lists. There are also add-ins available that help to maintain log-in information.
Was This Post Helpful? 0
  • +
  • -

#13 asyranok   User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 38
  • Joined: 19-May 13

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 03:03 PM

View Postandrewsw, on 26 May 2013 - 01:47 PM, said:

However, I think you need to bear in mind that a lot of modern browsers already have the facility to recall entered usernames, appearing in auto-complete lists. There are also add-ins available that help to maintain log-in information.



Yeah, but that is cleared when clearing cache, history, etc. in many cases.But I want this to be for any text field, even offline things, like logins to steam, logins to other programs offline etc.
Was This Post Helpful? 0
  • +
  • -

#14 qwertyuu   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 66
  • Joined: 31-July 12

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 09:12 PM

You seem to be looking for a Windows Shell Extension: http://www.codeproje...es-Shell-Part-1

Your usage might not exactly be the same, but you should be able to tweak it for your needs.

Have fun!

PS: sorry for the offencive reply I made; I didn't get your question at first and it felt like there were a lack of research

EDIT: you might also want to do some encryption to store the passwords and find a way to authenticate the user before giving out passwords!

This post has been edited by qwertyuu: 26 May 2013 - 09:14 PM

Was This Post Helpful? 0
  • +
  • -

#15 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 7091
  • View blog
  • Posts: 24,092
  • Joined: 05-May 12

Re: How to add new options to the right-click menu?

Posted 26 May 2013 - 09:18 PM

Chrome doesn't clear my passwords when I clear my cache.

Additionally, how will you detect if field in a text input field? Will you know that custom consoles within DirectX surfaces created by games? Will you know about a custom console app that resurrects the old Turbo Pascal Text editor? Will you know about the text drawing surface provided GUI text editors like VIM and SlickEdit?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1