If you are trying to deteect it:
if (Mouse.Buttons == MouseButtons.Left)
{
...
else if (Mouse.Buttons == MouseButtons.Right)
{
...
}
If you are trying to simulate a mouse button press, then you can use
Button.PerformClick[
^], but there is no direct way to force a right click in .NET - you would probably have to use PInvoke to send a mouse message to teh relevant control.
A better way would be to extract the code from the Click event handler and call it directly...