与该窗体相关的程序
Option Explicit
Private Sub Form_KeyPress(KeyAscii As Integer)
Unload Me
End Sub
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
www.751com.cn()
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.2设置登录主窗体界面
在工程的窗体栏中添加一个窗体,点住窗体文件夹点右键----添加——添加窗体,设置各控件后如下图。
图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() '选择操作员
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页