声明:
PublicTypeSHFILEOPSTRUCT
hwndAsLong
wFuncAsLong
pFromAsString
pToAsString
fFlagsAsInteger
fAnyOperationsAbortedAsLong
hNameMappingsAsLong
lpszProgressTitleAsLong
EndType
PublicDeclareFunctionSHFileOperationLib"shell32.dll"Alias"SHFileOperationA"(lpFileOpAsSHFILEOPSTRUCT)AsLong
PublicConstFO_DELETE=&H3
PublicConstFOF_ALLOWUNDO=&H40
代码:
DimSHopAsSHFILEOPSTRUCT
DimstrFileasstring
WithSHop
.wFunc=FO_DELETE
.pFrom=strFile Chr(0)
.fFlags=FOF_ALLOWUNDO
EndWith
SHFileOperationSHop->
Event publicationOptionExplicit
PrivateDeclareFunctionOSGetLongPathNameLib"VB5STKIT.DLL"Alias"GetLongPathName"(ByVallpszLongPathAsString,ByVallpszShortPathAsString,ByValcchBufferAsLong)AsLong
PublicDeclareFunctionOSGetShortPathNameLib"kernel32"Alias"GetShortPathNameA"(ByVallpszLongPathAsString,ByVallpszShortPathAsString,ByValcchBufferAsLong)AsLong
FunctionGetLongPathName(ByValstrShortPathAsString)AsString
ConstcchBuffer=300
DimstrLongPathAsString
DimlResultAsLong
OnErrorGoTo0
strLongPath=String(cchBuffer,Chr$(0))
lResult=OSGetLongPathName(strShortPath,strLongPath,cchBuffer)
IflResult=0Then
GetShortPathName=""
Else
GetLongPathName=StripTerminator(strLongPath)
EndIf
EndFunction
PublicFunctionGetShortPathName(ByValstrLongPathAsString)AsString
ConstcchBuffer=300
DimstrShortPathAsString
DimlResultAsLong
OnErrorGoTo0
strShortPath=String(cchBuffer,Chr$(0))
lResult=OSGetShortPathName(strLongPath,strShortPath,cchBuffer)
IflResult=0Then
GetShortPathName=""
Else
GetShortPathName=StripTerminator(strShortPath)
EndIf
EndFunction
'-----------------------------------------------------------
'函数:StripTerminator
'
'返回非零结尾的字符串
一个SQL存储过程可以包含多个SQL语句
1、为树状浏览器控件添加节点和子节点
用ADD方法添加一个新节点到树状浏览器的NODES集合时,可以声明它是和已存在的节点所联系起来的
剑网三帮会钓鱼在VB中绘制实时曲线是比较难的,一般要应用第三方控件或是WindowsAPI函数来完成,但是如果你对实时曲线的要求不是很高,只要能表示出当前的一般情况的话,我们可以直接应用VB提供给我们的空间来完成
。