Hello once again! I have searched in vain for a solution to this issue however, any threads that I've seen online were regarding copying a specific state of a dynamic image and were unresolved...or were more like what I was looking for and it was unresolved.
My current form uses a webbrowser control to display an image search of different sites (There are radio buttons for each site and you select the current one you want to search). Then I want the user to be able to easily copy the file to the clipboard for use immediately for my program in which the webbrowser is a part or, of course, in an actual image editor. This whole thing works like a charm however it is a bit of a pain as a user of the program to have a long context menu pop up when they right-click on the image that they desire to use. The sole use of the image as far as my program is to be copied therefore any other options are overkill and cause the potential for users to select another context menu option that is unwanted by them. I have set IsWebBrowserContextMenuEnabled to false so the original context menu is suppressed. I have created my own context menu with Copy Image as ToolStripMenuItem1. When I debug the program everything works including the right-click context menu having Copy Image as the only available option.
The problem lies with how I get the desired image into the clipboard. The best (perhaps only) tutorial I found online would successfully use x+y coordinates of where the mousepointer is and allow only the URL of the image to be put into the clipboard. But that does not work with what my program would later do with the image. I need the image itself which the user has their cursor over to be copied to the clipboard. Basically I want the broswer to do EXACTLY what it naturally does when you Copy an Image of a website that you are browsing but I cannot find anywhere online how it is naturally done within the webbrowser control.
I tried finding a way to remove all unneeded options from the context menu and leave only the Copy Image
option available but all research lead me to believe that this was not possible. That you must suppress the default context menu and create one. Which is fine, I just don't know how to get my new context to do perform a function that, by default, the control already does.
Any help, pointers, etc would be very much appreciated and I will see what I can do to give credit to those that can help me!