Dim pth As String = ProjectPath & "Syscm\用户设置\" '设置保存路径
Dim nms() As String = {"sgchk","jlchk","zjchk"}
Dim cvs As String = ""
For Each nm As String In nms
cvs &= e.Form.Controls(nm).Checked & chr(11)
Next
Dim form As String = e.Form.name
Dim dd As String = pth & form & ".txt"
FileSys.WriteAllText(dd, cvs.trim(chr(11)), False, Encoding.Default)
-----------------------------
Dim pth As String = ProjectPath & "Syscm\用户设置\" '设置保存路径
Dim form As String = e.Form.name
Dim dd As String = pth & form & ".txt"
Dim cvs() As String = FileSys.ReadAllText(dd,Encoding.Default).split(chr(11))
Dim nms() As String = {"sgchk","jlchk","zjchk"}
If cvs.length = nms.length Then
For i As Integer = 0 To nms.length-1
e.Form.Controls(nms(i)).Checked = cvs(i)
Next
End If
[此贴子已经被作者于2017/11/8 10:30:29编辑过]