Private Sub Form_Load()
lblCompanyProduct.ForeColor = RGB(238, 78, 48)
lblVersion.ForeColor = RGB(238, 78, 48)
End Sub
Private Sub Frame1_Click()
Unload Me
Load Login
Login.Show
End Sub
Private Sub imgLogo_Click()
Unload Me
Load Login
Login.Show
End Sub
Private Sub Label1_Click()
Unload Me
Load Login
Login.Show
End Sub
Private Sub lblPlatform_Click()
Unload Me
Load Login
Login.Show
End Sub
Private Sub lbladdress_Click()
Unload Me
Load Login
Login.Show
End Sub
Private Sub lblCompany_Click()
Unload Me
Load Login
Login.Show
End Sub
Private Sub lblCopyright_Click()
Unload Me
Load Login
Login.Show
End Sub
Private Sub lblProductName_Click()
Unload Me
Load Login
Login.Show
End Sub
Private Sub lblVersion_Click()
Unload Me
Load Login
Login.Show
End Sub
Private Sub Timer1_Timer()
Unload Me
Load Login
Login.Show
End Sub
Private Sub Timer2_Timer()
Timer1.Enabled = False
End Sub
5.2 窗体相关的程序
Dim datacount As Integer '操作员个数
Private Sub cmdCancel_Click() '取消
If Login1 = 1 Then
Unload Login
Else
End
End If
operater.Recordset.Close
End Sub
Private Sub cmdDate_Click()
DTPicker1.Visible = True
End Sub
Private Sub CmdOK_Click() '登录
If txtPassword = Password And Trim(Password) <> "" Or datacount = 0 Then
If Login1 = 1 Then
Load Mainform
Else
Mainform.Show
End If
If Rights = 2 Then
Mainform.M_Setup.Visible = False
Else
Mainform.M_Setup.Visible = True
End If
Me.Hide
If Login1 = 1 Then Mainform.StatusBar1.Panels.Item(1).Text = "管理员: " & Operater1
If Rights = 1 Then
Mainform.M_ChangePassword.Visible = True
Else
Mainform.M_ChangePassword.Visible = False
End If
Else
MsgBox "输入的密码有误,请重新输入!!!!"
txtPassword.SetFocus
End If
txtPassword = ""
End Sub
Private Sub Combo1_Click() '选择操作员
If Trim(Combo1.Text) <> "" And datacount <> 0 Then
txtPassword.Enabled = True
txtPassword.SetFocus
operater.RecordSource = "select * from operater where 姓名='" & Trim(Combo1.Text) & "'"
operater.Refresh
Operater1 = operater.Recordset.Fields(0)
Password = operater.Recordset.Fields(1)
Rights = operater.Recordset.Fields(2)
End If
End Sub
Private Sub DTPicker1_Change() '改变日期
Date = DTPicker1.Value
DTPicker1.Visible = False
txtDate = Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日"
www.751com.cn
If datacount = 0 Then
Operater1 = "无"
Combo1.Enabled = False
txtPassword.Enabled = False
cmdOK.Enabled = True
Text1.Visible = True
Else
operater.Recordset.MoveFirst
Do While operater.Recordset.EOF = False
Combo1.AddItem operater.Recordset.Fields(0)
operater.Recordset.MoveNext
Loop
Text1.Visible = False
End If
End Sub
Private Sub Text2_Change()
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页