想鸟一样飞翔

专注于php开发。对c++也很有兴趣!!!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

随笔分类 -  vb&asp 技术

vb和asp的一些经典代码
摘要:很早前就郁闷vb没有多线程,后来,有人说解决啦,很是高兴,看了之后,才知道原来是调用的API,在系统中创建个线程。不是很理想,不能调试。前几天和同事谈这个事,在他的启发下,发现能解决这个问题,当然这个也是假的,但是可以乱真。就是用Timer控件去模拟一个线程。 为什么一定要模拟多线程?VB 现在挺好。但是,当你想在你的处理程序上增加一个等待画面的时候,你就会感到不爽!!!。我写了一个小例子,希望能... 阅读全文
posted @ 2009-05-21 16:46 redfox 阅读(469) 评论(0) 推荐(0)

摘要:算法(Algorithm):计算机解题的基本思想方法和步骤。算法的描述:是对要解决一个问题或要完成一项任务所采取的方法和步骤的描述,包括需要什么数据(输入什么数据、输出什么结果)、采用什么结构、使用什么语句以及如何安排这些语句等。通常使用自然语言、结构化流程图、伪代码等来描述算法。 一、计数、求和、求阶乘等简单算法 此类问题都要使用循环,要注意根据问题确定循环变量的初值、终值或结束条件,更要注... 阅读全文
posted @ 2008-04-15 19:31 redfox 阅读(2439) 评论(0) 推荐(0)

摘要:http://www.yuanma.org/data/2006/0718/article_1163.htm // search.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "LinkTable.h" #define MAX_KEY 500 //---... 阅读全文
posted @ 2008-04-15 19:30 redfox 阅读(888) 评论(0) 推荐(0)

摘要:Time 返回系统时钟的当前时间。 Date 返回系统时钟的当前日期。 Now 返回代表当前日期和时间的编码值。该函数经常用作其它系统时钟函数的参数。 Hour(Time) 返回指定时间的小时部分(0到23)。 Minute(Time) 返回指定时间的分钟部分(0到59)。 Second(Time) 返回指定时间的秒部分(0到59)。 Day(Date) 返回月份中的日期数(1到3... 阅读全文
posted @ 2007-11-05 10:28 redfox 阅读(843) 评论(0) 推荐(0)

摘要:Dim str As String Dim i Dim charPra As String str = Trim(Text1.Text) For i = 1 To Len(str) If Asc(Left(str, 1)) < 0 Then 'MsgBox Left(str, 1) Text1.Text = "" Text1.SelStart = 0 ... 阅读全文
posted @ 2007-10-07 21:31 redfox 阅读(570) 评论(0) 推荐(0)

摘要:假设定义的记录名为myres Dim myexcel As New Excel.Application Dim mybook As New Excel.Workbook Dim mysheet As New Excel.Worksheet Set mybook = myexcel.Workbooks.Add '添加一个新的BOOK Set mysheet = mybook.Worksheets.... 阅读全文
posted @ 2007-09-16 18:29 redfox 阅读(559) 评论(1) 推荐(0)

摘要:Dim conn As ADODB.Connection Dim myrec As ADODB.Recordset Dim adopre As ADODB.Parameter Dim cmd As ADODB.Command Set conn = New ADODB.Connection Set myrec = New ADODB.Recordset ... 阅读全文
posted @ 2007-08-13 12:04 redfox 阅读(565) 评论(0) 推荐(0)

摘要:创建Excel,把数据存入Excel Private Sub ComExport_Click() Dim xlApp As New Excel.Application Dim xlBook As New Excel.Workbook '定義Excel工作簿對象 Dim... 阅读全文
posted @ 2007-08-09 22:10 redfox 阅读(1576) 评论(0) 推荐(0)

摘要:存储过程如下create proc sp_recordset @bbb int as select * from aaa where bbb = @bbbvb代码如下: Dim cmd As ADODB.Command Dim conn As ADODB.Connection Dim rs As ADODB.Recordset Dim ADOPrm Set ADOPrm = ... 阅读全文
posted @ 2007-08-09 21:50 redfox 阅读(521) 评论(0) 推荐(0)

摘要:这是一个好东东 阅读全文
posted @ 2007-08-06 22:24 redfox 阅读(226) 评论(0) 推荐(0)

摘要:winapi函数介绍 GetPrivateProfileString VB声明 Declare Function GetPrivateProfileString& Lib ... 阅读全文
posted @ 2007-08-06 22:15 redfox 阅读(7944) 评论(1) 推荐(1)

摘要:1。经常出现的写法 在VB中实现对数据库的访问,我们可能会通过一个全局函数来实现,例如以下的代码: Public Function DBSqlOpen(strName As String, strPWD As String, _ strIP As String, strDatabase As String) As ADODB.Connectio... 阅读全文
posted @ 2007-08-06 22:07 redfox 阅读(499) 评论(0) 推荐(0)