VBGood网站全文搜索 Google

搜索VBGood全站网页(全文搜索)
首页 - 经验之谈 - 提取Win9x拷贝的动画
发表评论(0)作者:, 平台:, 阅读:11346, 日期:2000-03-12


Win9x的文件拷贝既有动画,又有复制进度条显示,Vb中如何实现?此动画能

在Windows中提取出来吗?

A:

拷贝文件用SHFileOperation函数,例如:

Option Explicit

Private Type SHFILEOPSTRUCT

hwnd As Long

wFunc As Long

pFrom As String

pTo As String

fFlags As Integer

fAnyOperationsAborted As Boolean

hNameMappings As Long

lpszProgressTitle As String

End Type

Private Declare Function SHFileOperation Lib "shell32.dll" Alias

"SHFileOperationA" _

(lpFileOp As SHFILEOPSTRUCT) As Long

Private Const FO_COPY = &H2

Private Sub Form_Load()

Dim lResult As Long, SHF As SHFILEOPSTRUCT

SHF.hwnd = hwnd

SHF.wFunc = FO_COPY

SHF.pFrom = "E:\Linux\linux-2.2.2.tar.gz"

SHF.pTo = "C:\"

lResult = SHFileOperation(SHF)

End Sub

- Prisoner