button和contextmenustrip,
点击button让contextmenustrip显示在这个button的下面,
该怎么写呢?
private void btnDebug_Click(object sender, EventArgs e)
{
int x = this.btnDebug.Location.X + this.btnDebug.Size.Width;
int y = this.btnDebug.Location.Y + this.btnDebug.Size.Height;
contextMenuStrip1.Show(this, x, y);
}
看看实际效果,就知道怎么回事了。
谢谢,可用哦