随笔分类 - 代码
摘要:object o = this.GetType().GetField(name, System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.IgnoreCase).GetValue(this); return ((Control)o);
阅读全文
摘要:Timer.bas:Option ExplicitDeclare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As LongDeclare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As LongPublic Sub TimerProc(B
阅读全文
摘要://十进制转二进制Console.WriteLine(Convert.ToString(69, 2));//十进制转八进制Console.WriteLine(Convert.ToString(69, 8));//十进制转十六进制Console.WriteLine(Convert.ToString(69, 16));//二进制转十进制Console.WriteLine(Convert.ToInt32...
阅读全文
摘要:对于Asp.Net.在TextBox1中输入内容后,按下enter键后,执行Button1的click方法,在page_load事件增加如下代码即可实现:TextBox1.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {d...
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/----10进制转16进制createfunctioninttohex(@int10int)returnsvarchar(8)begindeclare@int10intdeclare@str16nvarc...
阅读全文
摘要:使用正则表达式分割字符串: string str = "5B5B5B5B0003220101935D5D5D5D5B5B5B5B0003220101935D5D5D5D"; Regex reg = new Regex(@".{1,3}"); MatchCollection mc = reg.Matches(str); foreach (Match m in mc) { Response.Write...
阅读全文
摘要:JavaScript中,replace()方法如果直接用str.replace("-","!"),只会替换第一个匹配的字符!我们可以采用如下方法实现替换匹配字符:1,循环替换 for(j=0;j<strValue.length;j++) { strValue=strValue.replace('','') }2,<script type="text/javascript" langu...
阅读全文
摘要:CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 Sql数据列表导出到EXCEL#region Sql数据列表导出到EXCEL 2 /**//// 3 ///sql语句 4 /// l...
阅读全文
摘要:Dim thing As Variant Set fso = CreateObject("Scripting.FileSystemObject") Set fld = fso.getFolder("strFolderPath") For Each thing In fld.Files ...... Next 遍历指定文件夹下所有的文...
阅读全文
摘要:马上就要回家了,却突然冒出了好多问题,真的是好烦人!但是也没有办法啊,事终归是要做的,就赶紧抓紧时间处理问题吧!昨天碰到一个客户反映他们系统的导出数据有问题,说是什么结果不正确,数据导出不完全!就查了下代码:导出数据写txt文本文件代码如下: Dim objFileSys As New FileSystemObject Dim objStream As TextStream Di...
阅读全文
摘要:/----查看OCX组件的属性 OCX classid html中的写法 OCX中的属性事件
阅读全文

浙公网安备 33010602011771号