| 发表于:2008-01-10 09:49:4015楼 得分:0 |
1、 vb3的安装程序 我有 vb advantage version 6 这个东西的安装我也有 (不过不知道怎么注册) 还有这个包 freetools_vb3conversion.exe (同样需要注册,我也没有) 2、 写程序转换 我也在试 这是找来的一段 可惜 保存后 还是有问题 'this is the code that is used to convert from vb3 to vb6. public function convertvb3tovb6(byval strinfilename as string, _ byval stroutfilename as string, _ byval blnsschange as boolean, _ byval blnoverwrite as boolean) as boolean dim objfs as scripting.filesystemobject dim objtsin as scripting.textstream dim objtsout as scripting.textstream dim strresponse as string dim strwhile as string dim aryline() as string redim aryline(200) dim arydeleted() as boolean dim i as long dim j as long mblnsschange = blnsschange mlngrecordno = 0 do reset strwhile = "creating scripting.filesystemobject" on error resume next set objfs = new scripting.filesystemobject strresponse = err.description on error goto 0 if len(strresponse) > 0 then exit do '* open input strwhile = "opening " & strinfilename on error resume next set objtsin = objfs.opentextfile(strinfilename, _ forreading, false) strresponse = err.description on error goto 0 if len(strresponse) > 0 then exit do '* open output - no overwrite strwhile = "opening " & stroutfilename on error resume next set objtsout = objfs.createtextfile(stroutfilename, _ blnoverwrite, false) strresponse = err.description on error goto 0 if len(strresponse) > 0 then exit do do if objtsin.atendofstream then exit do mlngrecordno = mlngrecordno + 1 if mlngrecordno > ubound(aryline) then redim preserve aryline(2 * mlngrecordno) on error resume next aryline(mlngrecordno) = objtsin.readline strresponse = err.description on error goto 0 if len(strresponse) > 0 then strresponse = strresponse & vbcrlf & _ "reading record #=" & cstr(mlngrecordno) & vbcrlf & _ "after=" & aryline(mlngrecordno) exit do end if loop redim preserve aryline(mlngrecordno) redim arydeleted(mlngrecordno) if len(strresponse) > 0 then exit do '***** '* process '***** strwhile = "processing " & strinfilename on error resume next processrecords aryline, arydeleted, strinfilename strresponse = err.description on error goto 0 if len(strresponse) > 0 then exit do for i = 1 to ubound(aryline) if arydeleted(i) = false then on error resume next objtsout.writeline aryline(i) strresponse = err.description on error goto 0 if len(strresponse) > 0 then strresponse = strresponse & vbcrlf & _ "writing record #=" & cstr(mlngrecordno) & vbcrlf & _ "after=" & aryline(mlngrecordno) exit do end if else end if next exit do: loop '* close on error resume next objtsin.close objtsout.close on error goto 0 '* check for error if len(strresponse) > 0 then strresponse = strresponse & vbcrlf & _ "while " & strwhile err.raise vbobjecterror + 513, "convertvb3tovb6", strresponse end if end function | | |
|