Finding MousePointer in WinForms
-
Hello Coders, In my Form I have LinkButton, PictureBox. I want to populate the ContextMenu MenuItems Dynamically based on the Control . for this i need to find at which control mouse pointer is ? any sounds will be appriciated. regards GV Ramana
-
Hello Coders, In my Form I have LinkButton, PictureBox. I want to populate the ContextMenu MenuItems Dynamically based on the Control . for this i need to find at which control mouse pointer is ? any sounds will be appriciated. regards GV Ramana
Your question, at face value, sounds meaningless. Handle right click on the link button and populate the context menu accordingly (as it should be for the link button), and handle right click for the picturebox, and do the same in its handler. That's it! But obviously the fact that you have asked the question means that there is more to it than that! So what's more? Koushik Biswas
-
Your question, at face value, sounds meaningless. Handle right click on the link button and populate the context menu accordingly (as it should be for the link button), and handle right click for the picturebox, and do the same in its handler. That's it! But obviously the fact that you have asked the question means that there is more to it than that! So what's more? Koushik Biswas
I think he is looking for a generic way, something like Form.KeyPreview is for keys but for the mouse. The only way I think is to use hooks, as this is the only approach I have seen.