2010年10月19日

C#操作Word完全功略

摘要: 前提:导入COM库:Microsoft word 11.0 Object Library.引用里面就增加了:创建新WordobjectoMissing=System.Reflection.Missing.Value;Word._ApplicationoWord;Word._DocumentoDoc;oWord=newWord.Application();oWord.Visible=true;oDoc=oWord.Documents.Add(refoMissing,refoMissing,refoMissing,refoMissing);打开文档:objectoMissing=System.Re 阅读全文

posted @ 2010-10-19 05:19 badyue 阅读(295) 评论(0) 推荐(0) 编辑

C#利用word书签实现模板打印功能

摘要: C#中的水晶报表好用,但是需要注册码。这里介绍C#调用word直接打印,既方便,又漂亮。开发指南:1. 必须安装office的.net开发包。2. 在工程的reference中添加com组件:Microsoft Word 11.0 Object Library打印的代码如下:Microsoft.Office.Interop.Word.Application app = null; Microsoft.Office.Interop.Word.Document doc = null; object missing = System.Reflection.Missing.Value; object 阅读全文

posted @ 2010-10-19 05:18 badyue 阅读(877) 评论(0) 推荐(0) 编辑

C#用 excel 作为模板打印的源码

摘要: //打印操作,套打、打印、预览enum PrintFlag{/// <summary>/// 套打,只打印没有印刷的部分/// </summary>CasePrint,/// <summary>/// 打印全部/// </summary>PrintAll,/// <summary>/// 预览全部/// </summary>PreviewAll}//套打、打印、预览三个按钮关联些委托实例private void Print_Click(object sender, System.EventArgs e){Button bt 阅读全文

posted @ 2010-10-19 05:17 badyue 阅读(9041) 评论(0) 推荐(0) 编辑

C#调用QQ的DLL实现截图功能

摘要: 今天写个程序 需要抓屏 懒得写代码 上网找 突然想到QQ的抓屏不错 直接拿来用就是了 [ DllImport( "CameraDll.dll", EntryPoint="CameraSubArea", CharSet=CharSet.Ansi )]private static extern bool CameraSubArea(); if(CameraSubArea()){IDataObject iData = System.Windows.Forms.Clipboard.GetDataObject();if(iData.GetDataPresent(& 阅读全文

posted @ 2010-10-19 05:16 badyue 阅读(2285) 评论(1) 推荐(0) 编辑

解决关于System.Collections.IList在WebService中无法序列化的问题

摘要: 1.在WebService的类中添加特殊属性 [XmlInclude(typeof(List))] 红色字为ILIST中数据类型 2.为ILIST集合中的类添加特殊属性 [Serializable] public class cst_ProjectGroupStatusInfo { } 3.类里面必需有一个无参数的构造函数 public cst_ProjectGroupStatusInfo() { //这里的内容可以为空 } 经过以上3步解决返回值为System.Collections.IList类型的问题 阅读全文

posted @ 2010-10-19 05:14 badyue 阅读(2057) 评论(1) 推荐(0) 编辑

导航