Private Sub Form_Load()
dim cur_dir1,cur_dir2
dim temp,i
cur_dir1 = App.Path'程序路径
CommonDialog1.filename=cur_dir1 & "\spama.ini"
Open CommonDialog1.FileName For Binary As #1
temp = Split(Input(LOF(1), 1), vbNewLine)'读入ini文件到内存数组
close #1
for i=0 to ubound(temp)
if temp(i)="[ptom]" then
cur_dir2=right(temp(i+1),len(temp(i+1)-4)'取得[ptom]字段的路径
exit for
end if
next i
CommonDialog1=cur_dir2 & "\ss.txt"
Open Cmd1.FileName For Binary As #1
temp = Split(Input(LOF(1), 1), vbNewLine)'读入ini文件到内存数组1.text
close #1
for i=0 to ubound(temp)
text1.text=text1.text & temp(i) & vbcrlf
next i
end sub
dim cur_dir1,cur_dir2
dim temp,i
cur_dir1 = App.Path'程序路径
CommonDialog1.filename=cur_dir1 & "\spama.ini"
Open CommonDialog1.FileName For Binary As #1
temp = Split(Input(LOF(1), 1), vbNewLine)'读入ini文件到内存数组
close #1
for i=0 to ubound(temp)
if temp(i)="[ptom]" then
cur_dir2=right(temp(i+1),len(temp(i+1)-4)'取得[ptom]字段的路径
exit for
end if
next i
CommonDialog1=cur_dir2 & "\ss.txt"
Open Cmd1.FileName For Binary As #1
temp = Split(Input(LOF(1), 1), vbNewLine)'读入ini文件到内存数组1.text
close #1
for i=0 to ubound(temp)
text1.text=text1.text & temp(i) & vbcrlf
next i
end sub
[此贴子已经被作者于2017-7-8 22:02编辑过]