getting和setting
我用注册机保存text控件中的文字,在写程序的电脑好使,打包完换电脑运行就不保存了?
回复 楼主 zhao649388
Private Sub Form_Load()Dim e
If GetSetting("vb", "jl", "jlj") <> "" Then
' For e = 1 To 5
Text1.Text = GetSetting("vb", "jl1", "jlj")
Text2.Text = GetSetting("vb", "jl2", "jlj")
Text3.Text = GetSetting("vb", "jl3", "jlj")
Text4.Text = GetSetting("vb", "jl4", "jlj")
'Text1(e).Text = GetSetting(App.Title, "Text1", "Text" & e, "")
'
'DoEvents
'Next
''Next e
End If
Frame1.Visible = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
SaveSetting "vb", "jl1", "jlj", Text1.Text
SaveSetting "vb", "jl2", "jlj", Text2.Text
SaveSetting "vb", "jl3", "jlj", Text3.Text
SaveSetting "vb", "jl4", "jlj", Text4.Text
' For e = 1 To 5
'' Text1(e).Text = GetSetting("vb", "jl", "jlj")
'SaveSetting App.Title, "Text1", "Text" & e, Text1(e).Text
'
'DoEvents
'Next
End Sub