回复:(刨子头)把代码贴出来,瞅瞅先。
'其中FILE_NAME = App.Path & "\myset.ini"
Private Sub cmdSaveSetup_Click()
........
........
'这里就是保存Option的value值到一个ini文件中
Call WritePrivateProfileString("form", "code(1)", Option1.Value, FILE_NAME)
Call WritePrivateProfileString("form", "code(2)", Option2.Value, FILE_NAME)
Call WritePrivateProfileString("form", "code(3)", Option3.Value, FILE_NAME)
.........
.........
End Sub
.......
.......
Private Sub Form_Load() '初始化时候读取
.......
.......
Option1.Value = GetPrivateProfileInt("form", "code(1)", Option1.Value, FILE_NAME)
Option2.Value = GetPrivateProfileInt("form", "code(2)", Option2.Value, FILE_NAME)
Option3.Value = GetPrivateProfileInt("form", "code(3)", Option3.Value, FILE_NAME)
.......
.......
End Sub
checkbox可以正常读取,只有Option不行
[此贴子已经被作者于2007-10-1 23:52:19编辑过]