资源描述:
《vb编写计算access数据库密源代码》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、VB编写破解Access程序源代码1、首先是窗体代码OptionExplicitPrivateSubcmdOpenFile_Click()DimsFileAsStringDimsPasswdAsStringDimsVersionAsStringcmdOpenFile.Enabled=FalsesFile=INNER_GetFileName(True,"mdb(*.mdb)
2、*.mdb","MDB",txtFileName.Text,"请选择数据库文件")IfLen(sFile)>0ThenShape1.Wi
3、dth=0txtFileName=sFiletxtVersion=""txtPassword=""sPasswd=INNER_GetAccessPwd(sFile,sVersion)txtVersion=sVersiontxtPassword=sPasswdEndIfcmdOpenFile.Enabled=TrueEndSubPrivateSubForm_Load()Shape1.Width=0EndSub2、接着是模块代码OptionExplicit#ConstUSE_DAO=0#IfUSE_DAOThe
4、nPublicgDAOAsDAO.Database#ElsePublicgADOAsADODB.Connection#EndIfPublicFunctionINNER_GetFileName(ByValfbOpenAsBoolean,_OptionalByValfsFilterAsString,_OptionalByValfsDefaultExtAsString,_OptionalByValfsDefFileAsString,_OptionalByValfsDialogTitleAsString)AsStr
5、ingOnErrorGoToErrLabelDimiReplaceAsIntegerWithfrmMain.CommonDialog1IffsFilter=""Then.Filter="所有文件(*.*)
6、*.*"Else.Filter=fsFilterEndIf.Flags=cdlOFNHideReadOnlyOrcdlOFNExplorer.CancelError=True.DefaultExt=fsDefaultExtIffsDialogTitle<>""Then.DialogTitle=fsDial
7、ogTitleIffsDefFile<>""Then.FileName=fsDefFileDoIffbOpenThen.ShowOpenElse.ShowSaveEndIfIfLen(.FileName)=0ThenExitFunctionEndIfIfNotfbOpenThenIfLen(Dir(.FileName))>0TheniReplace=MsgBox("代替存在的"+.FileName+"吗?",vbYesNoCancel+vbQuestion)ElseiReplace=0EndIfIfiRep
8、lace=vbCancelThenExitFunctionEndIfElseIfNot(Len(Dir(.FileName))>0)ThenExitFunctionEndIfLoopWhileiReplace=vbNoIfNotfbOpenThenIfiReplace=vbYesThenKill.FileNameEndIfEndIfINNER_GetFileName=.FileNameEndWithErrLabel:SelectCaseErr.NumberCase75MsgBoxErr.Descriptio
9、n&",请重新选择文件路径!",vbExclamationEndSelectEndFunctionPublicFunctionINNER_GetAccessPwd(fsDBseeAsString,fsRetVerAsString)AsStringDimsTempAsStringDimbytVer(2)AsByteDimbytDB_IDAsByteDimbyt2AsByteDimbytSecret(19)AsByteDimbytEncrept(19)AsByteDimlAsLongDimnAsLongDiml
10、MaxAsLongDimiFreeFileAsIntegeriFreeFile=FreeFileOpenfsDBseeForBinaryAs#iFreeFileGet#iFreeFile,&H9D,bytVerIfbytVer(0)=0ThenfsRetVer="3.51"ElsefsRetVer=Chr(bytVer(0))&Chr(bytVer(1))&Chr(bytVer(2))EndIfGet#iFree