2004年9月27日

启动一个进层阻止当前线程

摘要: VB.NET Private Sub CallProcess()Sub CallProcess(ByVal path As String) Dim p As New System.Diagnostics.Process() p.StartInfo.FileName = path p.StartInfo.WindowStyle = ProcessW... 阅读全文

posted @ 2004-09-27 02:12 小牛哥 阅读(1034) 评论(0) 推荐(0) 编辑

2004年9月25日

使用DataReader填充DataTable

摘要: VB.NET ''' ----------------------------------------------------------------------------- ''' ''' Fill DataTable from DataReader ''' ''' DataReader对象 ''' 返回DataTable ''' ''... 阅读全文

posted @ 2004-09-25 16:55 小牛哥 阅读(5688) 评论(10) 推荐(0) 编辑

Asc和Chr

摘要: C# public static int Asc(string character) { if (character.Length == 1) { System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding()... 阅读全文

posted @ 2004-09-25 13:10 小牛哥 阅读(2668) 评论(7) 推荐(0) 编辑

获得一个随机数

摘要: VB.NET Public Function GetRandomNumber()Function GetRandomNumber(Optional ByVal Low As Integer = 1, Optional ByVal High As Integer = 100) As Integer Dim oRandom As System.Random oRa... 阅读全文

posted @ 2004-09-25 11:36 小牛哥 阅读(1168) 评论(1) 推荐(0) 编辑

将Html代码转换为Text

摘要: 在抓取html页时,需要过滤掉html代码,获取Html源代码中的Text,有正则表达式可以解决这个问题:VB.NET ''' ----------------------------------------------------------------------------- ''' ''' 移除所有的html标签 ''' ''' html代码 '... 阅读全文

posted @ 2004-09-25 11:20 小牛哥 阅读(5488) 评论(10) 推荐(0) 编辑

调用API捕获屏幕图像

摘要: 捕获屏幕图像俗称抓屏,在http://cnblogs.com/spidertan/archive/2004/09/03/39362.aspx提供了C#的版本,本文提供VB.NET和C#两个语言版本的代码(ScreenCapture.VB和ScreenCapture.CS),主要功能就是捕获屏幕或者窗口上的图象。http://www.codeguru.com/code/legacy/cs_graph... 阅读全文

posted @ 2004-09-25 10:53 小牛哥 阅读(3602) 评论(1) 推荐(0) 编辑

获得一个字符的ASCII值

摘要: VB.NET代码: Dim charactertofind As String 'Find ASCII value of g charactertofind = "g" charactertofind = Asc(charactertofind) 'MsgBox(charactertofind) window code Response.Write(char... 阅读全文

posted @ 2004-09-25 09:18 小牛哥 阅读(3698) 评论(10) 推荐(0) 编辑

返回当前目录中的文件名列表

摘要: VB.NET语法: ''' ----------------------------------------------------------------------------- ''' ''' 返回当前目录中与给定 sSearchPattern(如“*.txt”)匹配的文件名列表 ''' 如果sSearchPattern为空,则返回当前目录中所有的文件名列表 ... 阅读全文

posted @ 2004-09-25 08:41 小牛哥 阅读(1846) 评论(2) 推荐(0) 编辑

2004年9月24日

删除指定目录里的所有文件

摘要: VB.NET _ Public Shared Function DelFiles()Function DelFiles(ByVal sPhysicalDirectory As System.String, Optional ByVal isPhysicalDirectory As Boolean = True) As Boolean Dim ... 阅读全文

posted @ 2004-09-24 10:05 小牛哥 阅读(2484) 评论(4) 推荐(0) 编辑

2004年9月23日

在循环体中如何实现叠放效果

摘要: 在图片管理系统中较为常见,图片需要每隔5个缩微图后换行,如下效果:列1 列2 1 2 3 4 5 6实现这个叠放效果特别简单:VB.NET Dim iLoop As Integer Dim iSpan As Integer = 1 Response.Write("列1" + ControlChars.Tab) ... 阅读全文

posted @ 2004-09-23 22:35 小牛哥 阅读(1004) 评论(3) 推荐(0) 编辑

2004年9月21日

checkBox为什么没有响应CheckedChanged事件

摘要: 我发觉CSDN不错,慢慢学会怎么玩了,Blog我很少看回帖,我很佩服好多人的精力……控件的AutoPostBack必需指定为True,才能响应CheckedChanged事件: 代码我替你精简了一下: Private Sub ChkName_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ... 阅读全文

posted @ 2004-09-21 12:55 小牛哥 阅读(2687) 评论(0) 推荐(0) 编辑

2004年9月19日

title这个标签相当诡异

摘要: 主 题: 我刚接触asp.net,问个入门的问题(页面不能显示)!谢谢大家 作 者: qqiiluo (叶舟) 等 级: 信 誉 值: 100 所属社区: .NET技术 ASP.NET 问题点数: 30 回复次数: 5 发表时间: 2004-09-19 04:26:25 我写的asp.net页面在xp的ie里面显示不出来,在2000就可以... 阅读全文

posted @ 2004-09-19 05:50 小牛哥 阅读(610) 评论(1) 推荐(0) 编辑

弹出窗口和关闭窗口(VB.NET/ASP.NET)

摘要: 在CSDN上答复一个网友的问题,CSDN限制字数,发了三个就不让我让发了 Namespace Common Public Class Window _ Public Shared Sub CloseWin() Dim oStringBuilder As New System.Text.StringBuilder o... 阅读全文

posted @ 2004-09-19 04:02 小牛哥 阅读(6560) 评论(2) 推荐(0) 编辑

2004年7月21日

Passing Multiple Parameters in NavigateURL Property of Hyperlink

摘要: One of the frequently asked questions in newsgroups is, how do I pass multiple parameters in the hyperlinkcolumn of a datagrid. If you need to pass multiple parameters then convert that column to item... 阅读全文

posted @ 2004-07-21 09:36 小牛哥 阅读(943) 评论(2) 推荐(0) 编辑

2004年6月22日

测试应用程序运行的总耗费时间

摘要: 测试应用程序运行的总耗费时间 Dim Start As Long '在应用load处添加以下代码 Start = Timer() '在应用程序运行结束前添加以下代码 "总耗费时间 " + (Timer() - Start).ToString + " 毫秒" '调用的时间函数 Public Function Timer() As ... 阅读全文

posted @ 2004-06-22 10:02 小牛哥 阅读(891) 评论(2) 推荐(0) 编辑

导航