您的位置:首页 > 编程语言 > VB

VB利用api删除元素

2016-07-13 10:39 375 查看
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)
Dim Test%()

Private Sub Command1_Click()
Dim i%
For i = 0 To UBound(Test)
If i = 10 Then
CopyMemory Test(10), Test(11), 178
ReDim Preserve Test(UBound(Test) - 1)
End If
Next
MsgBox UBound(Test)
MsgBox Test(98)
End Sub

Private Sub Form_Load()
Dim i%
For i = 0 To 99
ReDim Preserve Test(i)
Test(i) = i
Next
End Sub
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: