首页 新闻 会员 周边

winfrom 控件问题

0
[已解决问题] 解决于 2014-07-02 15:24

button和contextmenustrip,

点击button让contextmenustrip显示在这个button的下面,

该怎么写呢?

夜星冷的主页 夜星冷 | 初学一级 | 园豆:71
提问于:2014-07-02 14:05
< >
分享
最佳答案
0

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);

}

奖励园豆:5
Firen | 大侠五级 |园豆:5385 | 2014-07-02 15:20

看看实际效果,就知道怎么回事了。

Firen | 园豆:5385 (大侠五级) | 2014-07-02 15:21

谢谢,可用哦

夜星冷 | 园豆:71 (初学一级) | 2014-07-02 15:24
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册