很简单的,现在就尝试一下吧
PublicFunctionDecryptFlashFXP(passwordAsString)AsString
DimxAsInteger
Dimmagic()AsString
DimchrresultaAsInteger
DimchrresultbAsInteger
DimchrlastAsInteger
DimchrtmpAsInteger
DimmagicnumAsInteger
DimpwdtmpAsString
'MAGICBUFFER="yA36zA48dEhfrvghGRg57h5
'UlDv3"
magic=Split("121,65,51,54,122,65,52,56,100,69,104,102,114,118,103,104,71,82,103,53,55,104,53,85,108,68,118,51",",")
chrlast=Val("&H"&Mid(password,1,2))
magicnum=0
Forx=3ToLen(password)Step2
chrtmp=Val("&H"&Mid(password,x,2))
chrresulta=(chrtmpXormagic(magicnum))
chrresultb=chrresulta-Val(chrlast)
Ifchrresultb>255orchrresultb<0Then
chrresultb=chrresultb-&HFFFFFF01
EndIf
chrlast=chrtmp
pwdtmp=pwdtmp&Chr(chrresultb)
magicnum=magicnum+1
Ifmagicnum>27Then
magicnum=0
EndIf
Nextx
DecryptFlashFXP=pwdtmp
EndFunction
a(0)=b因而,你必须总是显式调用Item方法
不说废话,先看fso由哪几个对象组成:
drive对象:包含储存设备的信息,包括硬盘,光驱,ram盘,网络驱动器
drives集合:提供一个物理和逻辑驱动器的列表
file对象:检查和处理文件
files集合:提供一个文件夹中的文件列表
folder对象:检查和处理文件夹
folders集合:提供文件夹中子文件夹的列表
textstream对象:读写文本文件
看看fso的方法:由于很多,所以我不会把每个的作用写出来,如果有不懂的,自己查一下msdn->
作者: Demon
链接:
----下面是本人在给单位开发一个产品销售情况统计分析软件的过程中,使用Printer对象从Recordset对象的虚拟表中打印数据的通用代码:
SubPrintRecordset(recRecordsetasRecordset)
DimLeftMarginAsInteger
DimHeadTopPositionAsInteger
DimFieldNumAsInteger
DimPageCounterAsInteger
DimMyRecordsetAsRecordset
ConstFooterTopPosition=24
SetMyRecordset=recRecordset
PageCounter=1
'设置Printer对象坐标的度量单位为厘米
Printer.ScaleMode=vbCentimeters
LeftMargin=1.5
HeadTopPosition=2
----'定义打印页左上角的X坐标和Y坐标,通过改变ScaleLeft和ScaleTop的值,可改变打印页的左边距和上边距
Printer.ScaleLeft=-LeftMargin
Printer.ScaleTop=-HeadTopPosition
Printer.Font.Name="TimesNewRoman"
Printer.Font.Size=12
Printer.Print"LovesoftCorp."
Printer.Print""
IfMyRecordset.EOFAndMyRecordset.BOFThen
MsgBox"NoRecordAtPresend!",
vbCritical vbOKOnly,"PrintError"
ExitSub
EndIf
MyRecordset.MoveFirst
DoUntilPrinter.CurrentY>FooterTopPosition
'Printthefieldsoftherecordsetinsequence
ForFieldNum=0ToMyRecordset.Fields.Count-1
Printer.PrintMyRecordset.Fields
(FieldNum).Name&_
":"&_
MyRecordset.Fields(FieldNum).Value
IfPrinter.CurrentY>FooterTopPositionThen
Printer.CurrentX=8
Printer.Print"Page:"&PageCounter
'创建多页文档
Printer.NewPage
PageCounter=PageCounter 1
EndIf
NextFieldNum
MyRecordset.MoveNext
IfMyRecordset.EOFThenExitDo
'在记录之间空一行
Printer.Print""
Loop
'PrintthePagenumberasafooter
Printer.CurrentX=8
Printer.CurrentY=FooterTopPosition
Printer.Print"Page:"&PageCounter
'将输出送到打印机
Printer.EndDoc
EndSub
----调用上述PrintRecordset通用过程相当方便,下面是通过cmdPrint按钮的Click事件进行调用的一个实例:
PrivateSubcmdPrint_Click()
PrintRecordsetData1.Recordset
EndSub->
",64,"xxx病毒专杀"
bot"
Label3.Caption="东汉工作室"
Label4.Caption="东汉工作室"
Label1.FontName="研泽古印体"
Label2.FontName="研泽古印体"
Label3.FontName="研泽古印体"
Label4.FontName="研泽古印体"
Label1.ForeColor=QBColor(13)
Label3.ForeColor=QBColor(9)
EndSub
PrivateSubPicture2_Click()
End
EndSub
PrivateSubTimer1_Timer()
Picture2.Top=Picture2.Top-1
IfPicture2.Top<=-150ThenPicture2.Top=93
EndSub->
Function UnixTime()
Set objWMIService=_
GetObject("winmgmts:\\.\root\cimv2")
Set colItems=objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem",,48)
For Each objItem in colItems
TimeZone=objItem.CurrentTimeZone
Next
UnixTime=DateDiff("s", "01/01/1970 00:00:00", Now())
UnixTime=UnixTime - TimeZone * 60
End Function
。