发现二义性的名称:Form_Load 怎么解决?
我想在登陆界面搞一个需要密码登陆和时间,现在有两个Form_Load请问,怎么解决,我是新手,请把我程序改过之后再发上来,不要直接叫我改,我怕不会~~~PrivateSu...
我想在登陆界面搞一个需要密码登陆和时间,现在有两个Form_Load
请问,怎么解决,我是新手,请把我程序改过之后再发上来,不要直接叫我改,我怕不会~~~
Private Sub Command1_Click()
If Text1 = "123456" Then
MsgBox "密码正确,允许登录"
Else
Text1 = ""
PassNum = PassNum + 1
MsgBox "警告:密码错误"
Text1.SetFocus
End If
End Sub
Private Sub Form_Load()
PassNum = 0
Text1 = ""
Text1.PasswordChar = "*"
Text1.MaxLength = 6
Command1.Caption = "登录"
Command1.Default = True
Me.Show
Text1.SetFocus
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日 " & Time & " 星期" & Weekday(Now) - 1
End Sub 展开
请问,怎么解决,我是新手,请把我程序改过之后再发上来,不要直接叫我改,我怕不会~~~
Private Sub Command1_Click()
If Text1 = "123456" Then
MsgBox "密码正确,允许登录"
Else
Text1 = ""
PassNum = PassNum + 1
MsgBox "警告:密码错误"
Text1.SetFocus
End If
End Sub
Private Sub Form_Load()
PassNum = 0
Text1 = ""
Text1.PasswordChar = "*"
Text1.MaxLength = 6
Command1.Caption = "登录"
Command1.Default = True
Me.Show
Text1.SetFocus
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日 " & Time & " 星期" & Weekday(Now) - 1
End Sub 展开
2个回答
展开全部
Private Sub Form_Load()
PassNum = 0
Text1 = ""
Text1.PasswordChar = "*"
Text1.MaxLength = 6
Command1.Caption = "登录"
Command1.Default = True
Me.Show
Text1.SetFocus
Timer1.Interval = 1000
End Sub
写在一起就不是了
或者你可以不在load 事件里面设置的,你可以在设计阶断的时候把Timer控件的Interval属性改为1000
PassNum = 0
Text1 = ""
Text1.PasswordChar = "*"
Text1.MaxLength = 6
Command1.Caption = "登录"
Command1.Default = True
Me.Show
Text1.SetFocus
Timer1.Interval = 1000
End Sub
写在一起就不是了
或者你可以不在load 事件里面设置的,你可以在设计阶断的时候把Timer控件的Interval属性改为1000
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Form_Load()
PassNum = 0
Text1 = ""
Text1.PasswordChar = "*"
Text1.MaxLength = 6
Command1.Caption = "登录"
Command1.Default = True
Me.Show
Text1.SetFocus
Timer1.Interval = 1000
End Sub
PassNum = 0
Text1 = ""
Text1.PasswordChar = "*"
Text1.MaxLength = 6
Command1.Caption = "登录"
Command1.Default = True
Me.Show
Text1.SetFocus
Timer1.Interval = 1000
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询