ActiveX.txt
资源名称:ActiveX.rar [点击查看]
上传用户:china_gccl
上传日期:2022-07-09
资源大小:1k
文件大小:1k
源码类别:
ActiveX/DCOM/ATL
开发平台:
Visual Basic
- 在窗体里加入ActiveX控件(Windows Media Player),然后将此控件的url指向你的播放的音乐文件即可,记得将此控件隐藏!
- Private Sub Cmd确定_Click()
- On Error GoTo Err_Cmd确定_Click
- Dim mypasswords As String
- Dim jishu As Integer
- jishu = jishu + 1
- If jishu < 3 Then
- mypasswords = DLookup("password", "用户密码", "[username]=" & "'" & Me!用户名 & "'")
- If IsNull(Me.密码) = False And Me.密码 = mypasswords Then
- Me.Visible = False
- DoCmd.Close acForm, "登陆背景", acSaveYes
- If Me!用户名 = "管理员" Then
- DoCmd.OpenForm "考勤管理系统", acNormal, , , acFormReadOnly, acWindowNormal
- Else
- DoCmd.OpenForm "员工查询系统", acNormal, , , acFormReadOnly, acWindowNormal
- End If
- Else
- MsgBox "用户名和密码错误,请仔细确认", , "请重新输入"
- Me.密码.SetFocus
- End If
- Else
- MsgBox "已经试过三次,将要退出,如想进入请与管理员联系!"
- Quit
- End If
- Exit_Cmd确定_Click:
- Exit Sub
- Err_Cmd确定_Click:
- MsgBox "请输入用户名和密码,工作时请不要如此大意"
- Resume Exit_Cmd确定_Click
- End Sub