http://dev.csdn.net/develop/article/20/20312.shtm
解决方案 »
- 图像为XAML格式
- 类如何实现[""],像Session["abc"]
- c# %20如何转换成空格?
- 按时间倒序删除指定文件夹下的所有文件
- 用 HttpWebRequest 获取某个网站的登录验证码
- 一个字符串转换的问题!
- 对 C# 和 JavaScript 的 正则 的疑问:
- 怎样得到OleDbDataReader中的条数啊.
- DirectoryInfo类能否用于获取"我的电脑"的各个盘符的信息?
- Datatable(ADO.net,OLE DB)&Excel
- ListView 里的Item有没有双击事件,如果没有,有什么可以变通的方法?
- 请教高手,如何让TreeView在展开子级时,才绑定该子级的数据?
{
Point pos1 = new Point(200,300) //200和300是坐标,自己可以改
this.contextMenu2.Show(this.button1,pos1);
}
: wangsaokui(无间道III(终极无间))
Point pos1 = new Point(200,300) //200和300是坐标,自己可以改
自己没法改它的位置又不是固定的,也就是无法捕捉鼠标的具体位置!!
如A
AA
AAA
AAB
AB
ABA
ABB
B
BA
BB
BBA
BBB就是将两个contextmenu合并到一个
为什么一定要用左键呢?不解!
如果一定要用,就用API捕捉系统右键消息,用左键处理
{
if(e.Button==MouseButton.Left)
{
处理
}
}
Point pos = Control.MousePosition;
this.NotifyMenu.Show(this.button1, pos);
Control control = new Control(null,Control.MousePosition.X,Control.MousePosition.Y,1,1);
control.Visible = true;
control.CreateControl();
Point pos = new Point(0,0);这里的两个数字要根据你的上下文菜单大小适当地调整
this.NotifyMenu.Show(control,pos);刚学C#,不知道有否走弯路,还得高手指点!