当前位置:编程学习 > C#/ASP.NET >>

一个控件中的鼠标事件,如何计算定位一个右键菜单.需要哪些坐标?如何获得坐标?

谢谢 --------------------编程问答-------------------- --------------------编程问答--------------------

string.Format("X坐标{0}Y坐标{1}",e.X,e.Y);
--------------------编程问答-------------------- 右键菜单定位到一个按钮的下面


        private void button1_Click(object sender, EventArgs e)
        {
            this.contextMenuStrip1.Show(this, this.button1.Location.X, this.button1.Location.Y + this.button1.Height);
        }
--------------------编程问答--------------------
引用 3 楼 yhb417 的回复:
右键菜单定位到一个按钮的下面 


C# code
        private void button1_Click(object sender, EventArgs e)
        {
            this.contextMenuStrip1.Show(this, this.button1.Location.X, this.button1.Location.Y + this.button1.Height);
        }

支持
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,