随笔分类 -  C#WinForm

摘要:http://blog.csdn.net/hulihui/article/details/3158613http://blog.csdn.net/hulihui/article/details/3158613 阅读全文
posted @ 2014-07-07 09:27 keepsilence 阅读(114) 评论(0) 推荐(0)
摘要:先上图上图中左侧的图标是动态生成读取pic文件夹的png或者jpg格式当然也可以读取数据库的记录来生成图标然后选中左侧的图标然后拖动到网格区域在拖动图标的时候会出现一个十字辅助线此辅助线的中心点是图标的中心画连接线的时候线的起始点会随着你移动的位置而改变完成后可以保存下次可以打开在编辑保存的格式是*.mpf序列化保存序列化打开然后可以用反射动态的去加载窗体 阅读全文
posted @ 2012-07-10 14:25 keepsilence 阅读(1669) 评论(1) 推荐(0)
摘要:publicdelegatevoidHotkeyEventHandler(intHotKeyID);publicclassHotkey:System.Windows.Forms.IMessageFilter{System.Collections.HashtablekeyIDs=newSystem.Collections.Hashtable();IntPtrhWnd;publiceventHotkeyEventHandlerOnHotkey;publicenumKeyFlags{MOD_ALT=0x1,MOD_CONTROL=0x2,MOD_SHIFT=0x4,MOD_WIN=0x8}[DllI 阅读全文
posted @ 2012-06-07 15:35 keepsilence 阅读(370) 评论(0) 推荐(1)
摘要:截屏源码 阅读全文
posted @ 2012-06-07 15:25 keepsilence 阅读(192) 评论(0) 推荐(0)
摘要:privatevoidTree_AfterExpand(objectsender,TreeViewEventArgse){intFileID=int.Parse(((ListItem)comboxFile.Items[comboxFile.SelectedIndex]).ID);BackgroundWorkerbw=newBackgroundWorker();bw.DoWork+=newDoWorkEventHandler(bw_DoWork);bw.RunWorkerCompleted+=newRunWorkerCompletedEventHandler(bw_RunWorkerComple 阅读全文
posted @ 2012-04-23 08:58 keepsilence 阅读(272) 评论(0) 推荐(0)
摘要:publicclassPlugingManager{//插件装载器publicArrayListPlugins=newArrayList();//插件FullNamepublicArrayListPlugFullName=newArrayList();//插件类型publicArrayListPlugTypes=newArrayList();#region构造函数///<summary>///PlugingManager插件加载///</summary>///<paramname="plugspath">插件所在目录必须是运行目录中的文件 阅读全文
posted @ 2012-04-23 08:52 keepsilence 阅读(1384) 评论(0) 推荐(0)
摘要:下载地址 阅读全文
posted @ 2011-11-03 14:05 keepsilence 阅读(242) 评论(0) 推荐(0)
摘要:很多时候为了做集成我们别无选择的要用C#来调用C/C++的API,如果你对C#和C/C++数据类型对应关系不是很了解,那么这就是一件很头疼的事情了。下面来看看具体怎么使用void*OpenDevice(intnMyAddress,HWNDhWnd)voidCloseDevice(void*pDevice)voidSetMyAddress(void*pDevice,intnAddress)BOOLConnectPort(void*pDevice,LPCTSTRlpCommDef)BOOLIsConnect(void*pDevice)voidSetAddLog(void*pDevice,BOOLb 阅读全文
posted @ 2011-09-20 13:33 keepsilence 阅读(1128) 评论(2) 推荐(0)
摘要:在很多时候我们写好一个自定义控件后(编译后),把它拖放到窗体的时候他就加载了,但是可是有时候我们也许并不希望这样然而直接设置designmodel==true往往无效因此我们选择这样去处理public UserControl1(){ InitializeComponent(); if (this.GetService(typeof(IDesignerHost)) != null || System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Des... 阅读全文
posted @ 2011-05-13 10:58 keepsilence 阅读(418) 评论(0) 推荐(0)
摘要:首先这不是一编很高深的文章,意义在于学习。什么是 Crystal Reports?Crystal Reports 自 1993 年开始就已经是 Visual Studio 的一部分,并且现在已经成为了 Visual Studio 2005 中的标准报表创建工具。每套 Visual Studio 2005 都附带了该工具,并且它直接集成到开发环境中。利用 Crystal Reports for Visual Studio 2005 能够在 Windows 环境中创建达到演示质量的交互式内容。使用 Crystal Reports for Visual Studio 2005 可在基于 GUI 的程 阅读全文
posted @ 2010-05-27 10:49 keepsilence 阅读(474) 评论(0) 推荐(0)