random-file-runner/RyzStudio/Windows/ThemedForms/Button/TMenuButton.cs

29 lines
527 B
C#
Raw Permalink Normal View History

2021-10-24 15:49:48 +00:00
using System.Windows.Forms;
namespace RyzStudio.Windows.ThemedForms
{
public class TMenuButton : TButton
{
public TMenuButton()
{
}
protected override void OnMouseClick(MouseEventArgs e)
{
base.OnMouseClick(e);
if (e.Button == MouseButtons.Left)
{
if (this.ContextMenuStrip != null)
{
this.ContextMenuStrip.Show(this, e.Location);
}
}
}
}
}