VB电表管理信息系统 第4页
MDIme.del.Enabled = False
' FRMMAIN.DJGL.Enabled = False
' FRMMAIN.delte.Enabled = False
Else
' Me.XZCK.Enabled = True
MDIme.mczy.Enabled = True
MDIme.xtwh.Enabled = True
CreateNewKey HKEY_CURRENT_USER, "ZhiYuanTechnologe"
SetKeyValue HKEY_CURRENT_USER, "ZhiYuanTechnologe", "UserName", dlj, REG_SZ
SetKeyValue HKEY_CURRENT_USER, "ZhiYuanTechnologe", "PassWord", dlj, REG_SZ
' FRMMAIN.DJGL.Enabled = True
' FRMMAIN.delte.Enabled = True
End If
rec1("姓名") = Combo2.Text
rec1.Update
rec1.Close
Me.Hide
Guser = Combo2.Text
MDIme.Show
Else
MsgBox "权限或密码不正确,请重试!", vbInformation
End If
rec.Close
End Sub
Private Sub Command11_Click()
End Sub
Private Sub Command2_Click()
Combo2.Text = ""
Text2.Text = ""
Combo1.Text = ""
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Command4_Click()
Me.Hide
FRMMMXG.Show 1
End Sub
Private Sub Form_Activate()
Text2.Text = ""
Combo1.Text = ""
Combo2.Text = ""
Set rec = New ADODB.Recordset
rec.Open "select * from 记住密码", gCnn, 3, 3
If rec("标记") = "0" Or rec("标记") = "1" Then
Check1.Value = rec("标记")
End If
rec.Close
Set rec = New ADODB.Recordset
rec.Open "select * from 记住密码", gCnn, 3, 3
If rec("标记") = 1 Then
Combo2.Text = rec("姓名")
Combo1.Text = rec("权限")
Text2.Text = rec("密码")
End If
rec.Close
Command1.SetFocus
End Sub
Private Sub Form_Load()
gCnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:database password= " & DbPassword & " ;Data Source= " & _
App.Path & "\data\dbdb.mdb;Persist Security Info=False"
gCnn.CursorLocation = adUseClient
gCnn.Open
Set rec = New ADODB.Recordset
rec.Open "select distinct 姓名 from 密码表", gCnn, 3, 3
With Combo2
Do Until rec.EOF
.AddItem rec("姓名")
rec.MoveNext
Loop
End With
rec.Close
Set rec = Nothing
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Cancel = True
Select Case MsgBox("此操作将退出本系统,继续吗?", vbYesNo, "警告")
Case vbYes
Cancel = False
End
Case Else
Cancel = True
End Select
End Sub
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>