xtraTabbedMdiManager的标题上右鍵弹出关闭窗体菜单
实现一个增值功能, 在xtraTabbedMdiManager组件TabPage标题上右鍵弹出关闭当前窗体的菜单.

private void xtraTabbedMdiManager1_MouseUp(object sender, MouseEventArgs e)
{
//点左键无效, 必须是点右键弹出菜单
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); //显示弹出菜单
}
}
}
//来源:C/S框架网(www.csframework.com) QQ:1980854898
菜单事件:
private void menuItemCloseWindow_Click(object sender, EventArgs e)
{
xtraTabbedMdiManager1.SelectedPage.MdiChild.Close();
}
xtraTabbedMdiManager的标题上右鍵弹出关闭窗体菜单的更多相关文章
- IOS第二天-新浪微博 - 添加搜索框,弹出下拉菜单 ,代理的使用 ,HWTabBar.h(自定义TabBar)
********HWDiscoverViewController.m(发现) - (void)viewDidLoad { [super viewDidLoad]; // 创建搜索框对象 HWSearc ...
- WPF 介绍一种在MVVM模式下弹出子窗体的方式
主要是通过一个WindowManager管理类,在window后台代码中通过WindowManager注册需要弹出的窗体类型,在ViewModel通过WindowManager的Show方法,显示出来 ...
- WPF 在MVVM模式下弹出子窗体的方式
主要是通过一个WindowManager管理类,在window后台代码中通过WindowManager注册需要弹出的窗体类型,在ViewModel通过WindowManager的Show方法,显示出来 ...
- DevExpress第三方控件使用实例之ASPxPopupControl弹出子窗体
弹出页面控件:ASPxPopupControl, <dxpc:ASPxPopupControl ID="popubCtr" runat="server" ...
- html5手机端的点击弹出侧边滑动菜单代码
效果预览:http://hovertree.com/texiao/html5/19/ 本效果适用于移动设备,可以使用手机等浏览效果. 源码下载:http://hovertree.com/h/bjaf/ ...
- jquery弹出关闭遮罩层实例
jquery弹出关闭遮罩层实例. 代码如下: <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" & ...
- jQuery之点击弹出图标环形菜单
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8&quo ...
- MyEclipse弹出提示窗体
MyEclipse弹出提示窗体 1.弹窗例如以下
- 如何设置secureCRT的鼠标右键为弹出文本操作菜单功能
secureCRT的鼠标右键功能默认是粘贴的功能,用起来和windows系统的风格不一致, 如果要改为右键为弹出文本操作菜单功能,方便对选择的内容做拷贝编辑操作,可以在 options菜单----&g ...
随机推荐
- 撤销正在审核的app
一个app还未通过审核,但是新版本已经出来了,怎样才能撤销正在审核的app呢? 方法:在 是binary deatils里用 reject this binary.之后,即可以重新上传代码了.
- Linux下分割、合并PDF(pdftk),用于Linux系统的6款最佳PDF页面裁剪工具
Linux下分割.合并PDF(pdftk),用于Linux系统的6款最佳PDF页面裁剪工具 Linux下分割.合并PDF(pdftk) pdftk http://www.pdflabs.com/doc ...
- 快速近似最近邻搜索库 FLANN - Fast Library for Approximate Nearest Neighbors
What is FLANN? FLANN is a library for performing fast approximate nearest neighbor searches in high ...
- [转载] java的书
1. Java 语言基础 谈到Java 语言基础学习的书籍,大家肯定会推荐Bruce Eckel 的<Thinking in Java >.它是一本写的相当深刻的技术书籍,Java 语言基 ...
- Insert Interval leetcode java
题目: Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if nec ...
- 错误: 找不到或无法加载主类 Files\red5-server ,原因与解决办法
因为你把 red5放到了 Program Files 下,而Program Files 中间有个空格,启动路径不允许有空格,换个没空格的路径就OK啦
- SQL基础(一):SQL语法和命令
一.语法: 1.SQL 对大小写不敏感:SELECT 与 select 是相同的. 2.某些数据库系统要求在每条 SQL 语句的末端使用分号.分号是在数据库系统中分隔每条 SQL 语句的标准方法,这样 ...
- Kafka 配置说明
参考地址:http://my.oschina.net/infiniteSpace/blog/312890?p=1 server.properties中所有配置参数说明(解释) broker.id =0 ...
- Metronic V1.5.2 Responsive Admin Dashboard Template build with Twitter Bootstrap 3.0
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.0 Versi ...
- [Backbone] First Application!!!!
Important things to remember: 1. Usually, we create Collection, CollectionViews, Model, View. Collec ...