GetAllSettings(appname,section)
GetSetting(appname,section,key[,default]) :读取注册表信息
SaveSetting appname,section,key,setting:向注册表中写入一个注册信息
deletesetting appname,section,key,setting:删除注册表信息
·appname:应用程序名,字符串类型,用户指定
·section:节名,用户自己指定。
·key:关键字
·setting:赋值,用户像注册表里写的值
......
Option Explicit
Private Declare Function CreatePipe Lib "kernel32" (phReadPipe As Long, phWritePipe As Long, lpPipeAttributes As SECURITY_ATTRIBUTES, ByVal nSize As Long) As Long
Private Declare Function WriteFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, ByVal lpOverlapped As Long) As Long
Private Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, ByVal lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment As Long, ByVal lpCurrentDriectory As String, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As ......
云月VB代码格式化插件 1.0
CloudMoonFormatCode.dll 是一个VB6.0的插件,用于VB开发人员格式化代码。此插件完全免费。
主要功能:
在 VB6 IDE 中格式化当前打开窗口的代码,使你的代码更加整洁、美观。
提供关闭所有设计窗口的功能
提供关闭所有代码窗口的功能
......
自定义数据库链接类(Access)是链接Access数据库时使用的类。
补足:Application.StartupPath.ToString是指定生成.EXE文件的路径,把数据库和执行文件存放到一起时,不管安装后在什么路径都无需特定指定。
Imports System.Data.OleDb
#Region "全局变量"
Private mTimeout As Integer
Private mDbConn As OleDbConnection
Private mSqlConn As OleDbCommand 'SQL执行
Private sTblNm As String '存放数据的表名
Private mbOpen As Boolean 'DB链接判断用
Private mDbReader As ......
自定义数据库链接类(Access)是链接Access数据库时使用的类。
补足:Application.StartupPath.ToString是指定生成.EXE文件的路径,把数据库和执行文件存放到一起时,不管安装后在什么路径都无需特定指定。
Imports System.Data.OleDb
#Region "全局变量"
Private mTimeout As Integer
Private mDbConn As OleDbConnection
Private mSqlConn As OleDbCommand 'SQL执行
Private sTblNm As String '存放数据的表名
Private mbOpen As Boolean 'DB链接判断用
Private mDbReader As ......
'这里是启动过程[事件互斥就不写了]
Dim f as frmMain
Sub Main
Set f=New frmMain
f.Show
End Sub
'这里是一个线程类。。。随便写啥。。。
类名:BT
'这里是主窗口
Dim cBT as BT
Sub form_Load
'奇怪的问题就在这里...
Set cBT=CreateObject("工程名.BT")
'在Load事件中创建的对象(这里应该不能这么说,这个Load是由Sub Main中直接调用的... 应该是[在Sub Main中创建的对象]),
'这个对象无论如何,都还是与主线程处于同一线程似
'是否处于同一线程没法证实,但是这里创建的线程只要挂起,主窗口就会挂机
End Sub
'但这行代码
Set cBT=CreateObject("工程名.BT")
放在其它事件中。。比如 form_Active(),Buttom_Click()里面
子线程挂机,主窗口还是正常能接收消息的
就会正常。。。。
郁闷呐。。。 拆了一个上午。。。
总以为是其它类里面调用了啥造成主窗口卡死。。。 没想到会是这样。。 :(
继续折腾。。。。。。 ......
使用VB将ASP代码封装到DLL文件完整实例
http://blog.csdn.net/cncco/archive/2007/10/20/1834865.aspx
用VB封装ASP,建立SayHello测试程序
1、打开VB6,新建ActiveX DLL
2、在工程引用中加入Microsoft Active Server Pages Object Library选择
3、填加代码如下:
'Code Start
'声明部分
Private MyScriptingContext As ScriptingContext
Private MyApplication As Application
Private MyRequest As Request
Private MyResponse As Response
Private MyServer As Server
Private MySession As Session
'下面定义公用函数(在VB中访问ASP对象,即在VB中可以用MyApplication等同于ASP中的Application、MyRequest等同于ASP中的Request、 MyResponse等同于ASP中的Response、 MyServer等同于ASP中的Server、 MySession等同于ASP中的Session 使用)
Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
Set MyApplication = MyScriptingContext.Application
Set MyRequest = MyScriptingContext.Request
Set MyResponse = MyScriptingContext.Response
Set MyServer = MyScriptingContext.Se ......
使用VB将ASP代码封装到DLL文件完整实例
http://blog.csdn.net/cncco/archive/2007/10/20/1834865.aspx
用VB封装ASP,建立SayHello测试程序
1、打开VB6,新建ActiveX DLL
2、在工程引用中加入Microsoft Active Server Pages Object Library选择
3、填加代码如下:
'Code Start
'声明部分
Private MyScriptingContext As ScriptingContext
Private MyApplication As Application
Private MyRequest As Request
Private MyResponse As Response
Private MyServer As Server
Private MySession As Session
'下面定义公用函数(在VB中访问ASP对象,即在VB中可以用MyApplication等同于ASP中的Application、MyRequest等同于ASP中的Request、 MyResponse等同于ASP中的Response、 MyServer等同于ASP中的Server、 MySession等同于ASP中的Session 使用)
Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
Set MyApplication = MyScriptingContext.Application
Set MyRequest = MyScriptingContext.Request
Set MyResponse = MyScriptingContext.Response
Set MyServer = MyScriptingContext.Se ......