【发布时间】:2014-02-10 09:02:01
【问题描述】:
我的表单有一个链接标签 llInventory 和 ContextMenuStrip cmsInventory。当我在链接标签上左键单击时,上下文菜单条应在链接标签的正下方打开。所以我写了代码来定位 contextMenuStrip 但它仍然显示在屏幕的左上角,这是代码
private void llInventory_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
// llInventory.BackColor = Color.Blue;
//llInventory.ForeColor = Control.
Point p = new Point(this.llInventory.Location.X, this.llInventory.Location.Y + llInventory.Height);
cmsInventory.PointToScreen(p);
cmsInventory.Show();
}
}
我该如何解决这个问题?
【问题讨论】: