摘要: 1. 用Response.Write方法 代码如下: Response.Write(""); 此方法缺陷就是不能调用脚本文件中的自定义的函数,只能调用内部函数,具体调用自定义的函数只能在Response.Write写上函数定 义,比如 Response.Write("");3.普通的添加控件... 阅读全文
posted @ 2014-11-21 13:32 任锋 阅读(620) 评论(0) 推荐(0) 编辑
摘要: 以下是一些对excel的一些基本操作 1:工程对excel类库的导入,如:c:\program files\Microsoft office\offiece11\excel.exe2:命名控件的引入: using Microsoft.office.Interop.Excel;3:如果是对一个已经存在 阅读全文
posted @ 2014-11-10 13:08 任锋 阅读(353) 评论(0) 推荐(0) 编辑
摘要: ... 阅读全文
posted @ 2014-11-05 21:11 任锋 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 可以通过调用API函数将关闭按钮灰化(不可用) [DllImport("user32")] public static extern IntPtr GetSystemMenu(IntPtr hwnd, int bRevert); [DllImport("user32")] public static... 阅读全文
posted @ 2014-05-14 15:26 任锋 阅读(509) 评论(0) 推荐(0) 编辑
摘要: Spread 常用属性 1 取得当前行号、列号。 int row=e.Row; int count=e.Count;或者:int rowindex = fpSpread1.ActiveSheet.ActiveRowIndex;int columnindex = fpSpread1.ActiveSheet.ActiveColumnIndex; 2 单击一行变颜色。 private void spdResult_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e) { //单击Spread列头时,什么也不处理 ... 阅读全文
posted @ 2014-04-08 18:49 任锋 阅读(1144) 评论(0) 推荐(0) 编辑
摘要: 1取得当前行号、列号。introw=e.Row;intcount=e.Count;或者:introwindex=fpSpread1.ActiveSheet.ActiveRowIndex;intcolumnindex=fpSpread1.ActiveSheet.ActiveColumnIndex;2单击一行变颜色。privatevoidspdResult_CellClick(objectsender,FarPoint.Win.Spread.CellClickEventArgs e){//单击Spread列头时,什么也不处理if(!e.ColumnHeader){if(spdResult.Shee 阅读全文
posted @ 2014-04-08 18:46 任锋 阅读(1226) 评论(0) 推荐(0) 编辑
摘要: 应用程序启动与关闭事件 Form 和 Control 类和应用程序启动与关闭有关的时间。 当 Windows Form 应用程序启动时,会以下列顺序引发主要表单的启动事件: System.Windows.Forms.Control.HandleCreated System.Windows.Forms.Control.BindingContextChanged System.Windows.Forms.Form.Load System.Windows.Forms.Control.VisibleChanged System.Windows.Forms.Form.Activated System.W 阅读全文
posted @ 2014-03-31 14:00 任锋 阅读(401) 评论(0) 推荐(0) 编辑
摘要: sqlServer数据库修改时间详解:1.代码格式的例子:jspzijialvyou是数据库,zijiayouhuodong是数据表update [jspzijialvyou].[dbo].[zijiayouhuodong]set [addtime] = CONVERT(varchar, getdate()-30, 120 ) //这时候更新的时间格式是:2013-05-08 15:14:21这种格式的where [addtime] like '%201%';------------------------------------------------------2.upda 阅读全文
posted @ 2014-01-27 17:23 任锋 阅读(1009) 评论(0) 推荐(0) 编辑
摘要: SourceAnalysis(StyleCop)的终极目标是让所有人都能写出优雅和一致的代码,因此这些代码具有很高的可读性。早就听说了微软内部的静态代码检查和代码强制格式美化工具StyleCop,2008-05-23微软在MSDNCodeGallery发布了4.2版本,并命名为MicrosoftSourceAnalysisforC#。SourceAnalysis(StyleCop)不是代码格式化(代码美化)工具,而是代码规范检查工具(CodeReview工具),它不仅仅检查代码格式,而是编码规范,包括命名和注释等。SourceAnalysis(StyleCop)目的是帮助项目团队执行一系列常用 阅读全文
posted @ 2013-10-16 13:26 任锋 阅读(521) 评论(0) 推荐(0) 编辑
摘要: using System.Runtime.InteropServices;[DllImport("User32.dll")]public static extern void keybd_event(Byte bVk,Byte bScan,Int32 dwFlags,Int32 dwExtraInfo);private void button1_Click(object sender, System.EventArgs e){keybd_event(0x5b, 0, 0, 0); //0x5b是left win的代码,这一句使key按下,下一句使key释放。keybd_ev 阅读全文
posted @ 2013-10-12 17:21 任锋 阅读(451) 评论(0) 推荐(0) 编辑