chpwd.frm
资源名称:yf.rar [点击查看]
上传用户:laihaixin
上传日期:2013-01-26
资源大小:1169k
文件大小:7k
源码类别:
医药行业
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
- Begin VB.Form chpwd
- BackColor = &H00404040&
- BorderStyle = 3 'Fixed Dialog
- Caption = "用户修改密码"
- ClientHeight = 3075
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 4680
- Icon = "chpwd.frx":0000
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MDIChild = -1 'True
- MinButton = 0 'False
- Picture = "chpwd.frx":030A
- ScaleHeight = 3075
- ScaleWidth = 4680
- ShowInTaskbar = 0 'False
- Begin VB.PictureBox Picture2
- Height = 1095
- Left = 240
- Picture = "chpwd.frx":59F9
- ScaleHeight = 1035
- ScaleWidth = 4155
- TabIndex = 8
- Top = 1440
- Width = 4215
- Begin VB.Label Label3
- BackColor = &H00404040&
- BackStyle = 0 'Transparent
- Caption = " 密码最多只能输入20个英文字符或10个汉字或20个数字,不能输入其它标点符号或怪字符。建议密码不要使用汉字。"
- ForeColor = &H00000000&
- Height = 615
- Left = 360
- TabIndex = 9
- Top = 240
- Width = 3495
- End
- End
- Begin VB.PictureBox Picture1
- Height = 1215
- Left = 240
- Picture = "chpwd.frx":7DDC
- ScaleHeight = 1155
- ScaleWidth = 4155
- TabIndex = 1
- Top = 120
- Width = 4215
- Begin VB.TextBox Text1
- BackColor = &H00FFFFFF&
- ForeColor = &H000000FF&
- Height = 270
- IMEMode = 3 'DISABLE
- Left = 960
- PasswordChar = "*"
- TabIndex = 5
- Top = 240
- Width = 1095
- End
- Begin VB.TextBox Text2
- BackColor = &H00FFFFFF&
- ForeColor = &H000000FF&
- Height = 270
- IMEMode = 3 'DISABLE
- Left = 960
- PasswordChar = "*"
- TabIndex = 4
- Top = 600
- Width = 1095
- End
- Begin VB.CommandButton Command1
- Caption = "确定&(O)"
- Height = 300
- Left = 3000
- TabIndex = 3
- Top = 240
- Width = 1000
- End
- Begin VB.CommandButton Command2
- Caption = "取消&(C)"
- Height = 300
- Left = 3000
- TabIndex = 2
- Top = 600
- Width = 1000
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- BackColor = &H00404040&
- BackStyle = 0 'Transparent
- Caption = "旧密码:"
- ForeColor = &H00000000&
- Height = 180
- Left = 240
- TabIndex = 7
- Top = 285
- Width = 630
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- BackColor = &H00404040&
- BackStyle = 0 'Transparent
- Caption = "新密码:"
- ForeColor = &H00000000&
- Height = 180
- Left = 240
- TabIndex = 6
- Top = 645
- Width = 630
- End
- End
- Begin MSAdodcLib.Adodc Adodc1
- Height = 330
- Left = 360
- Top = 2640
- Visible = 0 'False
- Width = 1200
- _ExtentX = 2117
- _ExtentY = 582
- ConnectMode = 0
- CursorLocation = 3
- IsolationLevel = -1
- ConnectionTimeout= 15
- CommandTimeout = 30
- CursorType = 3
- LockType = 3
- CommandType = 8
- CursorOptions = 0
- CacheSize = 50
- MaxRecords = 0
- BOFAction = 0
- EOFAction = 0
- ConnectStringType= 1
- Appearance = 1
- BackColor = -2147483643
- ForeColor = -2147483640
- Orientation = 0
- Enabled = -1
- Connect = ""
- OLEDBString = ""
- OLEDBFile = ""
- DataSourceName = ""
- OtherAttributes = ""
- UserName = ""
- Password = ""
- RecordSource = ""
- Caption = "Adodc1"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- _Version = 393216
- End
- Begin VB.CommandButton Command3
- Caption = "关闭&(Q)"
- Height = 300
- Left = 3250
- TabIndex = 0
- Top = 2670
- Width = 1000
- End
- End
- Attribute VB_Name = "chpwd"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- On Error GoTo err1
- username = frmlogin.username
- If Text1.Text <> "" And Text2.Text <> "" Then
- Adodc1.RecordSource = "select * from usertab where 用户名='" & username & "' and 密码=" & "'" & Text1.Text & "'"
- Adodc1.Refresh
- If Adodc1.Recordset.AbsolutePosition = adPosUnknown Then
- MsgBox "旧密码错误!"
- Text1.Text = ""
- Text2.Text = ""
- Text1.SetFocus
- Else
- Adodc1.Recordset.Fields("密码") = Text2.Text
- Adodc1.Recordset.Update
- MsgBox "密码修改成功!"
- Text1.Text = ""
- Text2.Text = ""
- End If
- Else
- MsgBox "新旧密码均不得为空!"
- Text1.SetFocus
- End If
- Exit Sub
- err1:
- MsgBox "远程服务器连接失败!"
- End Sub
- Private Sub Command2_Click()
- Text1.Text = ""
- Text2.Text = ""
- Text1.SetFocus
- End Sub
- Private Sub Command3_Click()
- Unload Me
- End Sub
- Private Sub Form_Load()
- On Error GoTo err2
- chpwd.Top = (frmmain.Height - chpwd.Height) / 2 - 500
- chpwd.Left = (frmmain.Width - chpwd.Width) / 2
- Adodc1.ConnectionString = frmlogin.conn
- Text1.Text = ""
- Text2.Text = ""
- Exit Sub
- err2:
- MsgBox "远程服务器连接失败!"
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- frmmain.StatusBar1.Panels(2) = "目前没有窗口被激活"
- End Sub
- Private Sub Form_Activate()
- frmmain.StatusBar1.Panels(2) = "活动窗口:" & chpwd.Caption
- End Sub