8474.html
来自「以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题」· HTML 代码 · 共 23 行
HTML
23 行
<html>
<head>
<title>Re: 如何从一个文字档中检查字串...</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>Re: 如何从一个文字档中检查字串...</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by Cloud on December 21, 1998 at 10:35:58:<p>
In Reply to: <a href="8394.html">如何从一个文字档中检查字串...</a> posted by 天定.... on December 17, 1998 at 22:29:24:<p>
1.建议你将这个文字档案改成 *.mdb, 找资料会快 N 倍<br>2.如果还是一定要用文字档做, 必须只开一次档案, 然后<br> 这又有几种不同的做法:<br> Dim sGet As String, lFile As Long<br> Open App.Path & "\data.txt" For Binary As #1<br> lFile = LOF(1)<br> sGet = Space(lFile)<br> Get #1,, sGet<p> a. Dim vArr(0 To 2) As Variant 来 parse sGet<br> 这个字串<br> b. 把文字档格式改成:<br> Account = 1, Password = AAA, Score = 85<br> Account = 2, Password = BBB, Score = 88<br> ...<br> sGet 取得此文字档内容时, 再用 <br> InStr(sGet, "Account = " & Text1.Text)<br> 这样比法 a 快<br> <p><p><br>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 8474-->
</ul><!--end: 8474-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?