📄 11419.html
字号:
<html>
<head>
<title>Re: VB 写类似Config.sys格式档案</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>Re: VB 写类似Config.sys格式档案</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by <a href="mailto:stupids@ms5.url.com.tw">我依然是小呆瓜</a> on March 27, 1999 at 19:36:48:<p>
In Reply to: <a href="11357.html">VB 写类似Config.sys格式档案</a> posted by 新手 on March 25, 1999 at 20:12:12:<p>
: 请问Config.sys或System.ini这种格式的程式如何写?如何读和写档案内所想要之某一行资料? 谢谢!<p>Config,sys与System.ini与*.txt一样,都是纯文书格式<br>如存档..<br>Dim A As String, B As String, C As String, D As String, E As String, F As String<br>A="[Postion]"<br>B="X=100"<br>C="Y=250"<br>D="Z=-250"<br>E="[User]"<br>F="Name=stupids"<br>G="Age=22"<p>Fn= FreeFile<br>Open "stupids.ini" For Output As #Fn<br> Print #Fn ,A<br> Print #Fn ,B<br> Print #Fn ,C<br> Print #Fn ,D<br> Print #Fn ,E<br> Print #Fn ,F<br> Print #Fn ,G<br>Close #Fn<p>如读档要读出Name的资讯<br>Dim Tmp As String<br>Dim MyName As String<br>Fn=FreeFile<br>Open "stupids.ini" For Input As #Fn<br> Do Until Eof(Fn)<br> Line Input #Fn, Tmp<br> If UCase(Left( Trim(Tmp),5))="NAME=" Then MyName = Trim(Right(Tmp,Len(Tmp)-5))<br> Loop<br>Close #Fn
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 11419-->
</ul><!--end: 11419-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -