gly_qxForm.frm
资源名称:七八个vb游戏.rar [点击查看]
上传用户:tashmp
上传日期:2010-04-03
资源大小:882k
文件大小:9k
源码类别:
其他游戏
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
- Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
- Begin VB.Form gly_qxForm
- BackColor = &H00FFC0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "管理员权限管理"
- ClientHeight = 3180
- ClientLeft = 45
- ClientTop = 375
- ClientWidth = 6795
- Icon = "gly_qxForm.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3180
- ScaleWidth = 6795
- StartUpPosition = 3 'Windows Default
- Begin MSDataGridLib.DataGrid DataGrid1
- Bindings = "gly_qxForm.frx":08CA
- Height = 615
- Left = 3360
- TabIndex = 6
- Top = 840
- Width = 3255
- _ExtentX = 5741
- _ExtentY = 1085
- _Version = 393216
- HeadLines = 1
- RowHeight = 15
- BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ColumnCount = 2
- BeginProperty Column00
- DataField = ""
- Caption = ""
- BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
- Type = 0
- Format = ""
- HaveTrueFalseNull= 0
- FirstDayOfWeek = 0
- FirstWeekOfYear = 0
- LCID = 2052
- SubFormatType = 0
- EndProperty
- EndProperty
- BeginProperty Column01
- DataField = ""
- Caption = ""
- BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
- Type = 0
- Format = ""
- HaveTrueFalseNull= 0
- FirstDayOfWeek = 0
- FirstWeekOfYear = 0
- LCID = 2052
- SubFormatType = 0
- EndProperty
- EndProperty
- SplitCount = 1
- BeginProperty Split0
- BeginProperty Column00
- EndProperty
- BeginProperty Column01
- EndProperty
- EndProperty
- End
- Begin MSAdodcLib.Adodc gly_qxAdodc
- Height = 495
- Left = 480
- Top = 840
- Width = 1200
- _ExtentX = 2117
- _ExtentY = 873
- 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 = ""
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- _Version = 393216
- End
- Begin VB.CommandButton Command2
- BackColor = &H00FFC0C0&
- Caption = "取消"
- Height = 495
- Left = 4320
- Style = 1 'Graphical
- TabIndex = 5
- Top = 2520
- Width = 1575
- End
- Begin VB.CommandButton Command1
- BackColor = &H00FFC0C0&
- Caption = "添加"
- Height = 495
- Left = 480
- Style = 1 'Graphical
- TabIndex = 4
- Top = 2520
- Width = 1575
- End
- Begin VB.TextBox Text2
- BackColor = &H00FFC0C0&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- IMEMode = 3 'DISABLE
- Left = 2400
- PasswordChar = "*"
- TabIndex = 3
- Top = 1560
- Width = 2775
- End
- Begin VB.TextBox Text1
- BackColor = &H00FFC0C0&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 2400
- TabIndex = 2
- Top = 360
- Width = 2775
- End
- Begin VB.Image Image2
- Height = 720
- Left = 5640
- Picture = "gly_qxForm.frx":08E4
- Top = 1440
- Width = 720
- End
- Begin VB.Image Image1
- Height = 480
- Left = 5640
- Picture = "gly_qxForm.frx":2066
- Top = 360
- Width = 480
- End
- Begin VB.Label Label2
- BackColor = &H00FFC0C0&
- Caption = "管理员登密码:"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 240
- TabIndex = 1
- Top = 1560
- Width = 1695
- End
- Begin VB.Label Label1
- BackColor = &H00FFC0C0&
- Caption = "管理员登陆名:"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 240
- TabIndex = 0
- Top = 360
- Width = 1815
- End
- End
- Attribute VB_Name = "gly_qxForm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- '添加管理员记录
- Private Sub Command1_Click()
- Dim i As Integer
- If Text1 <> "" And Text2 <> "" Then
- gly_qxAdodc.Recordset.MoveFirst
- For i = 0 To gly_qxAdodc.Recordset.RecordCount - 1 Step 1
- If gly_qxAdodc.Recordset.Fields(0).Value = Text1.Text Then
- MsgBox "该记录以存在!!", 64
- Exit Sub
- Else
- gly_qxAdodc.Recordset.MoveNext
- End If
- If i = gly_qxAdodc.Recordset.RecordCount - 1 Then
- '该记录不存在 开始添加
- gly_qxAdodc.Recordset.AddNew
- gly_qxAdodc.Recordset.Fields(0).Value = Text1.Text
- gly_qxAdodc.Recordset.Fields(1).Value = Text2.Text
- gly_qxAdodc.Recordset.Update
- MsgBox "该记录以添加!", 64, "友情提示"
- End If
- Next i
- Else
- MsgBox "请输入用户名和密码", 48, "友情提示"
- End If
- End Sub
- Private Sub Command2_Click()
- Unload Me
- End Sub
- Private Sub Form_Load()
- Dim revalu As Long
- gly_qxAdodc.Visible = False
- DataGrid1.Visible = False
- revalu = SetWindowPos(gly_qxForm.hwnd, HWND_TOPMOST, Me.CurrentX, Me.CurrentY, _
- 1 / 15 * Me.Width, 1 / 15 * Me.Height, SWP_SHOWWINDOW)
- Me.Left = (Screen.Width - Me.Width) / 2 - 150
- Me.Top = (Screen.Height - Me.Height) / 2 - 150
- Call lind_gly_db
- End Sub
- '连接数据库
- Sub lind_gly_db()
- Dim dbpath As String
- If Right(App.Path, 1) <> "" Then
- dbpath = App.Path & ""
- Else
- dbpath = App.Path
- End If
- '以管理员登陆
- 'MsgBox "gly"
- dbpath = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False; Data Source=" & dbpath & "年审评定数据库.mdb"
- gly_qxAdodc.ConnectionString = dbpath
- gly_qxAdodc.CommandType = adCmdText
- gly_qxAdodc.RecordSource = "select * from 管理员权限表"
- '动态连接数据库时一定要刷新数据库
- gly_qxAdodc.Refresh
- End Sub