问题 1
我用setup factory打包一个vb6.0做的程序,打包成功安装后在目录文件下发现文件同打包前没有任何改变,这是为什么?
问题 2
上述文件安装在无vb的系统,提示某控件没有注册,为什么>
谢谢!
我用setup factory打包一个vb6.0做的程序,打包成功安装后在目录文件下发现文件同打包前没有任何改变,这是为什么?
问题 2
上述文件安装在无vb的系统,提示某控件没有注册,为什么>
谢谢!
解决方案 »
- 求救大虾:求一句代码,防止死机。忘了是哪句了。。。
- 一个关于保存数据到Excel的小问题
- 我想通过编程方法取得WIN2000性能监视器计数器的值,应该怎么做?
- 老问题又来了,我是真的需要你的帮助!关于S端数据库更新后如何通知C端如何实时刷新!
- 完全送分的问题!!!!!!!!!!!!!!!!!!
- 帮我看看这段代码,别人可以为什么我不行
- 系统托盘程序
- 组件能否返回对象?
- 如何得到打印机纸张的高度和宽度以及缺省打印(在线等待)
- 我做的的报表为何在打包安装后不能使用呢?关于datareport的问题!!!(高手快来出手相助,别伤了菜鸟的心)
- 比较怪的问题,听起来太菜,可是的却做不出来
- 我用unload me 为什么不能够把我的程序关闭呢??请帮忙,附有源代码
Private Declare Function CreateThread Lib "kernel32" (lThreadAttributes As Any, ByVal lStackSize As Long, ByVal lStartAddress As Long, ByVal larameter As Long, ByVal lCreationFlags As Long, lThreadID As Long) As Long
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal lMilliseconds As Long) As Long
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lProcName As String) As Long
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function GetExitCodeThread Lib "kernel32" (ByVal hThread As Long, lExitCode As Long) As Long
Private Declare Sub ExitThread Lib "kernel32" (ByVal lExitCode As Long)
'Purpose : This function registers and Unregisters OLE components
'Inputs : sDllPath The path to the DLL/OCX
' bRegister If True Registers the control, else unregisters control
'Outputs : Returns True if successful
'Author : Andrewb
'Date : 04/09/2000
'Notes : This effectively replaces RegSvr32.exe by loading the library and
' calling the register or unregister functions exposed by all OLE components.
'Revisions :
Function RegisterServer(ByVal sDllPath As String, Optional bRegister As Boolean = True) As Boolean
Dim lLibAddress As Long, lProcAddress As Long, lThreadID As Long, lSuccess As Long, lExitCode As Long, lThread As Long
Dim sRegister As String
Const clMaxTimeWait As Long = 20000 'Wait 20 secs for register to
complete
On Error GoTo ExitFunc
If Len(sDllPath) > 0 And Len(Dir(sDllPath)) > 0 Then
'File exists
If bRegister Then
sRegister = "DllRegisterServer"
Else
sRegister = "DllUnregisterServer"
End If
'Load library into current process
lLibAddress = LoadLibraryA(sDllPath)
If lLibAddress Then
'Get address of the DLL function
lProcAddress = GetProcAddress(lLibAddress, sRegister)
If lProcAddress Then
'Found interface, make call to component
lThread = CreateThread(ByVal 0&, 0&, ByVal lProcAddress, ByVal 0&, 0&, lThread)
If lThread Then
'Created thread
lSuccess = (WaitForSingleObject(lThread, clMaxTimeWait) = 0)
If Not lSuccess Then
'Failed to register, close thread
Call GetExitCodeThread(lThread, lExitCode)
Call ExitThread(lExitCode)
RegisterServer = False
Else
'Register control
RegisterServer = True
Call CloseHandle(lThread)
End If
End If
Else
'Object doesn't expose OLE interface
FreeLibrary lLibAddress
End If
Call FreeLibrary(lLibAddress)
End If
End If
ExitFunc:
On Error GoTo 0
End Function
1.你把你刚编译出来的exe和相关的资源文件复制到某一空目录下。
2.用安装工具添加该目录(包含目录下的文件和子目录)。
3.从 工具(T) 菜单选择 扫描VB工程... 然后指向你的vbp文件,让它扫描,他会把你引用的库和ocx也都加进来(你自己也要检察一下)。
4.在左边的 运行时支持 功能那里, 把VB6给勾上。 然后其它的你就可以自己设置了。注意: 你在自己添加 dll或ocx文件时,在列表里对它按右键-属性,高级标签一定要勾 注册dll/ocx 选项。