求救:vb与ini的问题

来源:百度知道 编辑:UC知道 时间:2024/09/20 17:45:39
想把程序配置存起来,但不懂。
我说个例子,大家给代码就行了。
单击command1后,将a,b,c,d,e这几个变量的值存到ini文件中,
单击commend2,将ini中的a,b,c,d,e的值显示在text1-5中。求代码
我看不懂啊,能不能根据我的情况写下代码?

Private Sub Command1_Click()
Open App.Path & "\date.ini" For Output As #1
Print #1, a
Print #1, b
Print #1, c
Print #1, d
Print #1, e
Close #1
End Sub
Private Sub Command2_Click()
Open App.Path & "\date.ini" For Input As #1
Input #1, a
Input #1, b
Input #1, c
Input #1, d
Input #1, e
Close #1
text1 = a
text2 = b
text3 = c
text4 = d
text5 = e
End Sub

答案补充:已经很“根据我的情况写下代码”了!你不会要我跑到你得机器上去看你的ini文件的位置和名字吧?

你点我的名字 在我的空间里有我网盘的地址!~

那里有个ini的例子 你看一下吧!~