xtraTabbedMdiManager的标题上右鍵弹出关闭窗体菜单
2020-12-13 02:47
标签:style class code http tar color 实现一个增值功能,
在xtraTabbedMdiManager组件TabPage标题上右鍵弹出关闭当前窗体的菜单. private void xtraTabbedMdiManager1_MouseUp(object sender, MouseEventArgs
e) //来源:C/S框架网(www.csframework.com)
QQ:1980854898 private void menuItemCloseWindow_Click(object sender, EventArgs
e) xtraTabbedMdiManager的标题上右鍵弹出关闭窗体菜单,搜素材,soscw.com xtraTabbedMdiManager的标题上右鍵弹出关闭窗体菜单 标签:style class code http tar color 原文地址:http://www.cnblogs.com/eastson/p/3781197.html
{
//点左键无效,
必须是点右键弹出菜单
if (e.Button !=
MouseButtons.Right) return;
BaseTabHitInfo
hint =
xtraTabbedMdiManager1.CalcHitInfo(e.Location);
//点击有效,且点击在TabPage标题上
if (hint.IsValid && (hint.Page
!= null))
{
//有效子窗体
if (xtraTabbedMdiManager1.SelectedPage.MdiChild
!= null)
{
Point
p =
xtraTabbedMdiManager1.SelectedPage.MdiChild.PointToScreen(e.Location);
menuStripCloseForm.Show(p); //显示弹出菜单
}
}
}
菜单事件:
{
xtraTabbedMdiManager1.SelectedPage.MdiChild.Close();
}
文章标题:xtraTabbedMdiManager的标题上右鍵弹出关闭窗体菜单
文章链接:http://soscw.com/essay/26293.html