有很多软件为了实现特殊的显示效果,采用非矩形的窗体,而这些窗体往往没有标题栏如果省略的话,那么你声明的变量将是变体型,变量的数据类型会根据你给变量赋的值而定,如你给这个变量赋的值是整型,那么它将是整型变量Int和Fix函数的区别在于如果number参数为负数时,Int函数返回小于或等于number的第一个负整数,而Fix 函数返回大于或等于number参数的第一个负整数一、设窗体上有若干个以Command1命名的命令按钮,现要求:点击其中一个按钮后,该按钮不可用,而其它的按钮均可用
strComputer="."
Set objWMIService=GetObject("winmgmts:\" & strComputer & "\root\WMI")
' Obtain an instance of the the class
' using a key property value.
Set objShare=objWMIService.Get("Lenovo_SetBiosPassword.InstanceName='ACPI\PNP0C14\1_0'")
' Obtain an InParameters object specific
' to the method.
Set objInParam=objShare.Methods_("SetBiosPassword"). _
inParameters.SpawnInstance_()
' Add the input parameters.
objInParam.Properties_.Item("Parameter")="test"
' Execute the method and obtain the return status.
' The OutParameters object in objOutParams
' is created by the provider.
Set objOutParams=objWMIService.ExecMethod("Lenovo_SetBiosPassword.InstanceName='ACPI\PNP0C14\1_0'", "SetBiosPassword", objInParam)
' List OutParams
Wscript.Echo "Out Parameters: "
Wscript.echo "Return: " & objOutParams.Return
将它们放在预定目录如“c:\bmp”中
strUser="guests"
strPath="D:\\abc.txt"
RetVal=AddPermission(strUser,strPath,"R",True)
·#:是一个整型数,用来指定列的宽度(如果指定了Width,则必须加代表列宽的整数)
2跑商FunctionCompFile(F1asstring,F2asstring)asboolean
Dimissameasboolean
OpenF1ForBinaryAs#1
OpenF2ForBinaryAs#2
issame=True
IfLOF(1)<>LOF(2)Then
issame=False
Else
whole&=LOF(1)\10000'numberofwhole10,000bytechunks
part&=LOF(1)Mod10000'remainingbytesatendoffile
buffer1$=String$(10000,0)
buffer2$=String$(10000,0)
start&=1
Forx&=1Towhole&'thisfor-nextloopwillget10,000
Get#1,start&,buffer1$'bytechunksatatime.
Get#2,start&,buffer2$
Ifbuffer1$<>buffer2$Then
issame=False
ExitFor
EndIf
start&=start& 10000
Next
buffer1$=String$(part&,0)
buffer2$=String$(part&,0)
Get#1,start&,buffer1$'gettheremainingbytesattheend
Get#2,start&,buffer2$'gettheremainingbytesattheend
Ifbuffer1$<>buffer2$Then
issame=False
EndIf
Close
CompFile=issame
EndFunction->
Function md5_file(filename, raw_output)
Dim HashedData, Utility, Stream
Set HashedData=CreateObject("CAPICOM.HashedData")
Set Utility=CreateObject("CAPICOM.Utilities")
Set Stream=CreateObject("ADODB.Stream")
HashedData.Algorithm=3
Stream.Type=1
Stream.Open
Stream.LoadFromFile filename
Do Until Stream.EOS
HashedData.Hash Stream.Read(1024)
Loop
If raw_output Then
md5_file=Utility.HexToBinary(HashedData.Value)
Else
md5_file=HashedData.Value
End If
End Function
。