http://ygyuan.go.163.com/
http://ygyuan.3322.net/API 超级工具下载!
http://ygyuan.3322.net/API 超级工具下载!
解决方案 »
- timer的使用,简单
- 用vb得随机文件方式进行数据的存取!使用了一个自定义类型!然后却无法正确的读出!!!在线等!!!!!!!!!
- 工程组中,exe项目引用着一个dll项目,dll项目中定义的全局变量,其在整个程序中的生存期是多长呢?
- MSFlexGrid 控件左右或上下拉动时触发什么事件?
- 单位积数与分户积数汇总之间存在小数点精度问题怎么解决
- 100分:有个程序,大家帮我注释一下吧,谢谢
- online你在线吗?
- 请问各位GIS高手在哪儿能下载到MapX啊?在线急等,多谢了!!
- 请教VB高手一个如何修改datagrid控件数据源的问题
- 如何在GRID中统计显示一批数据的合计数据和按某一类分类的小计数据
- 怎样删除磁盘上的文件?
- 如何锁定桌面?
lpvDest As Any, lpvSource As Any, ByVal cbCopy as Long)
这个函数可以将 lpvDest的momory copy 到lpvSource上去,cbCopy则代表要copy多少个byte。例如想一个Double值存在Memory中的各个byte到底是多少。Dim dbl as Double
Dim bte(0 to 7) as Byte
Dbl = 168.256
CopyMemory dbl, byt(0), 8
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Sub Form_Load()
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: [email protected]
Dim sSave As String, Cnt As Long, T As Long, Pos As Long, Length As Long
Const mStr = "Hello "
Length = Len(mStr)
sSave = Space(5000 * Length) 'make buffer for justified comparison
'Get the current tickcount
T = GetTickCount
Pos = 1
sSave = Space(5000 * Length)
For Cnt = 1 To 5000
Mid(sSave, Pos, Length) = mStr
Pos = Pos + Length
Next Cnt
'Show the results
MsgBox "It took Visual basic" + Str$(GetTickCount - T) + " msecs. to add 5000 times a string to itself."
'Get the current tickcount
T = GetTickCount
Pos = 0
sSave = Space(5000 * Length)
For Cnt = 1 To 5000
CopyMemory ByVal StrPtr(sSave) + Pos, ByVal StrPtr(mStr), LenB(mStr)
Pos = Pos + LenB(mStr)
Next Cnt
'Show the results
MsgBox "It took CopyMemory" + Str$(GetTickCount - T) + " msecs. to add 5000 times a string to itself."
End Sub
Lib "kernel32" Alias "RtlMoveMemory" _
(pDest As Any, _
pSrc As Any, _
ByVal ByteLen As Long)Public Declare Function SetWindowLong _
Lib "user32" Alias "SetWindowLongA" _
(ByVal hWnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As LongPublic Declare Function GetWindowLong _
Lib "user32" Alias "GetWindowLongA" _
(ByVal hWnd As Long, _
ByVal nIndex As Long) As LongPublic Declare Function CallWindowProc _
Lib "user32" Alias "CallWindowProcA" _
(ByVal lpPrevWndFunc As Long, _
ByVal hWnd As Long, _
ByVal Msg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) As Long
Public Const GWL_WNDPROC = (-4)
Public Const GWL_USERDATA = (-21)Dim ctlShadowControl As TextEx
Dim ptrObject As LongPublic Function SubWndProc( _
ByVal hWnd As Long, _
ByVal Msg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) As Long On Error Resume Next ptrObject = GetWindowLong(hWnd, GWL_USERDATA)
CopyMemory ctlShadowControl, ptrObject, 4
SubWndProc = ctlShadowControl.WindowProc(hWnd, Msg, wParam, lParam)
CopyMemory ctlShadowControl, 0&, 4
Set ctlShadowControl = Nothing
End Function