Jump to content

Trigger file's context menu


Recommended Posts

Is there a way to trigger the menu that would appear when you right click a particular file? I've seen other programs do this, but I don't have the first idea where to start.

I have a couple uses, but at the moment is a duplicate file lister. It outputs results in a listview, and I'd like users to be able to get the actual menu that would appear if they were clicking on the actual files instead of just my listview items. Being able to drag/drop would be nice too if anyone knows it, but I'm focusing on the context menu for now.

Any help would be appreciated. Even if it's to tell me you're sure it can't be done, then I can stop thinking about it. :sweating:

Link to comment
Share on other sites

look up how to create context menu entries in windows

https://stackoverflow.com/questions/20449316/how-add-context-menu-item-to-windows-explorer-for-folders

so it looks like some registry work for you, and maybe other assets if you choose.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

Sorry @Earthshine, I guess I was not clear. I don't want to add things to a context menu, I want the normal Windows menu to appear when/where I want.

ie: I can click a button, and the normal Windows right click menu for a file will appear (with Open, Send To, Cut, Copy, Paste, Properties, etc).
Like imagine a function like this:

$aMouse = MouseGetPos()
_WinAPI_FileTrackPopupMenu('C:\windows\notepad.exe', $aMouse[0], $aMouse[1])

I'm sure it won't be that easy though. :lol:

@Subz There's a lot to go through on that thread, and I'm about to go to bed so I will give it a thorough look later. Hopefully it's what I'm looking for. Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...