Right click with SendKeys in .NET
问题 I am using sendkeys in C# .NET. I have letters, arrow keys and enter working. I cant figure out how to send a right click for the context menu. I know i can press a key on my keyboard to do it but i have no idea how to send the msg. How do i? i googled and saw new MenuItem().PerformClick(); as a solution however i didnt see any affect. The keys are being sent to another application. 回答1: You can wrap the user32.dll, I got the general idea from here EDIT: I added in posX and posY, which would