以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]记住用户名和密码报错 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=126669) |
-- 作者:swimmer01 -- 发布时间:2018/10/26 11:52:00 -- [求助]记住用户名和密码报错 老师你好: 我做了个登录窗口,其afterLoad事件代码: Dim User_N As String Dim User_P As String e.Form.Controls("UserN").Text = getconfigvalue(User_N,"") e.Form.Controls("UserP").Text = getconfigvalue(User_P,"") \'******进入系统按钮代码: Dim chk1 As WinForm.CheckBox = e.Form.Controls("CheckBox1") \'*****设置默认值 Dim chk2 As WinForm.CheckBox = e.Form.Controls("CheckBox2") \'*****记住密码 Dim chk3 As WinForm.CheckBox = e.Form.Controls("CheckBox3") \'*****自动登录 If chk1.checked = True Then Dim User_N As String saveconfigvalue(User_N,e.Form.Controls("UserN").Text) End If If chk2.checked = True Then Dim User_P As String saveconfigvalue(User_P,e.Form.Controls("UserP").Text) End If 运行时报错: String 引用没有设置为 String 的实例。 参数名: s 不知啥原因,请指正。谢谢! |
-- 作者:有点蓝 -- 发布时间:2018/10/26 12:06:00 -- e.Form.Controls("UserN").Text = getconfigvalue("User_N","") e.Form.Controls("UserP").Text = getconfigvalue("User_P","") \'******进入系统按钮代码: Dim chk1 As WinForm.CheckBox = e.Form.Controls("CheckBox1") \'*****设置默认值 Dim chk2 As WinForm.CheckBox = e.Form.Controls("CheckBox2") \'*****记住密码 Dim chk3 As WinForm.CheckBox = e.Form.Controls("CheckBox3") \'*****自动登录 If chk1.checked = True Then saveconfigvalue("User_N",e.Form.Controls("UserN").Text) End If If chk2.checked = True Then saveconfigvalue("User_P",e.Form.Controls("UserP").Text) End If |
-- 作者:swimmer01 -- 发布时间:2018/10/26 13:59:00 -- 哦,谢谢! |