MSGBOX 自己设置的(密码错误)
form1:
Private Sub Command1_Click()
If Text2.Text <> tex.Text Then
MsgBox "确认密码有误,请重新确认密码", 16, "确认密码错误"
ElseIf tex.Text = "" Or Text2.Text = "" Then
MsgBox "密码不能为空", 16, "错误"
ElseIf Text2.Text = tex.Text Then
Form2.Show
Unload Me
txt = tex.Text
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Label3.FontSize = 13
Label1.FontSize = 10
Label2.FontSize = 10
tex.FontSize = 20
Text2.FontSize = 20
End Sub
form2:
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "密码不能为空", 16, "错误"
ElseIf Text1.Text <> txt Then
MsgBox "解锁密码错误", 16, "密码错误"
ElseIf Text1.Text = txt Then
Unload Me
End If
End Sub
Private Sub Form_Load()
Label1.FontSize = 40
Label2.FontSize = 50
Command1.FontSize = 40
Me.WindowState = 2
Text1.FontSize = 20
End Sub
Private Sub Form_Resize()
Command1.Left = Me.ScaleWidth / 2.5
Command1.Top = Me.ScaleHeight / 1.5
Text1.Top = Me.ScaleHeight / 2.5
Text1.Left = Me.ScaleWidth / 2.5
Label1.Top = Me.ScaleHeight / 2.5
Label1.Left = Me.ScaleWidth / 20
Label2.Top = Me.ScaleHeight / 20
Label2.Left = Me.ScaleWidth / 3
End Sub
Private Sub Timer1_Timer()
If Label2.Left > 0 Then
Label2.Left = Label2.Left - 200
ElseIf Label2.Left = 0 Then
Label2.Left = Me.ScaleWidth
End If