添加监听
AddClipboardFormatListener(this.Handle); 移除
RemoveClipboardFormatListener(this.Handle); #region 剪贴板监视器
[DllImport("user32.dll")]
public static extern bool AddClipboardFormatListener(IntPtr hwnd);
[DllImport("user32.dll")]
public static extern bool RemoveClipboardFormatListener(IntPtr hwnd);
private static int WM_CLIPBOARDUPDATE = 0x031D;
#endregion protected override void DefWndProc(ref Message m)
{
if (m.Msg == WM_CLIPBOARDUPDATE)
{
if (Clipboard.ContainsText())
{
//label1.Text = Clipboard.GetText();
this.pFramework.Application.CommandPool.EnableBarItem(typeof(YSC.PluginGIS.EditingPasteCommand).ToString(), true);
}
else if (Clipboard.ContainsImage())
{
//pictureBox1.Image = Clipboard.GetImage();
//pictureBox1.Update();
}
else
{
this.pFramework.Application.CommandPool.EnableBarItem(typeof(YSC.PluginGIS.EditingPasteCommand).ToString(), false);
}
}
else
{
base.DefWndProc(ref m);
}
}

clipboard_monitor_in_win7的更多相关文章

随机推荐

  1. 用JS控制video暂停再播放

    模块就是用来进行封装,进行高内聚 低耦合的功能.其实各人认为ng2 的模块和.net的工程类似,如果要使用模块中定义的功能,第一步就是必须要引用它,ng2 中叫import 导入.那么我们看模块是否有 ...

  2. DP(Dynamic programming)——尽力学习之中(2016 HUAS ACM 暑假集训-5)

    这周不打算按照以往的方式更新博客,而是采用整体的方式.一是因为学的太少,没东西写:二是这篇博客会经常更新的.如题,DP——尽力学习之中. ------------------------------- ...

  3. NewQuant的设计(一)——整体的领域设计

    NewQuant的设计思路——整体的领域分析 “领域驱动设计(DDD)”是著名软件工程建模专家Eric Evans提出的一个重要概念,是“面向对象分析设计(OOAD)”的深化.当业务逻辑变得复杂,系统 ...

  4. JSBinding / Testing

    Unity version compatibilities 5.3.5 5.2.0 5.1.5 5.0.4 4.7.2 4.7.0 4.6.9 4.6.0 4.5.5 Platform compati ...

  5. [Linux] - centos使用mount + nfs 远程共享存储

    服务端安装nfs 1.使用yum安装nfs yum install nfs-utils nfs-utils-lib -y 如果安装过程出现这样的错误: 得先安装lvm2 yum install -y ...

  6. CSS3常用30种选择器总结

    CSS3常用30种选择器总结 HTML5/CSS3时尚的圆盘时钟动画 带当前日期 www.html5tricks.com/demo/html5-css3-clock-with-date/index.h ...

  7. debian8 Apache 更改根目录

    进入配置文件,路径为:/etc/apache2/sites-available/000-default.conf 然后找到DocumentRoot /var/www/html ,将其更改为 Docum ...

  8. [转]第1讲 什么是EMI滤波器

    转:http://www.murata.com/zh-cn/products/emiconfun/emc/2010/10/28/en-20101028-p1 <前言> EMI是Electr ...

  9. 作品-网站 - [二次开发] 广联达BIM

    客户地区:北京 基于帝国ECMS二次开发 网址:http://bim.glodon.com 开发性质:二次开发 网站类型:企业级

  10. C++ const用法总结

    1 const分顶层const,底层const2 顶层const可以表示任意类型的对象是常量.eg:     const int i:i是一个整型常量    int *const ccc:ccc是指向 ...