⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmusers.frm

📁 鲜花管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "actskn43.ocx"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FrmUsers 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "管理员信息"
   ClientHeight    =   5880
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7950
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   5880
   ScaleWidth      =   7950
   Begin VB.TextBox txtname 
      Height          =   495
      Left            =   2520
      TabIndex        =   10
      Text            =   "Text1"
      Top             =   6360
      Width           =   2055
   End
   Begin ACTIVESKINLibCtl.Skin Skin1 
      Left            =   360
      OleObjectBlob   =   "FrmUsers.frx":0000
      Top             =   2760
   End
   Begin VB.Frame Frame1 
      Height          =   2175
      Left            =   240
      TabIndex        =   1
      Top             =   3240
      Width           =   7335
      Begin VB.CommandButton Command8 
         Caption         =   "上一条"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   2120
         TabIndex        =   9
         Top             =   480
         Width           =   1215
      End
      Begin VB.CommandButton Command7 
         Caption         =   "下一条"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   3760
         TabIndex        =   8
         Top             =   480
         Width           =   1215
      End
      Begin VB.CommandButton Command6 
         Caption         =   "最后一条"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   5400
         TabIndex        =   7
         Top             =   480
         Width           =   1215
      End
      Begin VB.CommandButton Command5 
         Caption         =   "删 除"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   480
         TabIndex        =   6
         Top             =   1320
         Width           =   1215
      End
      Begin VB.CommandButton Command4 
         Caption         =   "修 改"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   2120
         TabIndex        =   5
         Top             =   1320
         Width           =   1215
      End
      Begin VB.CommandButton Command3 
         Caption         =   "添 加"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   3760
         TabIndex        =   4
         Top             =   1320
         Width           =   1215
      End
      Begin VB.CommandButton Command2 
         Caption         =   "退 出"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   5400
         TabIndex        =   3
         Top             =   1320
         Width           =   1215
      End
      Begin VB.CommandButton Command1 
         Caption         =   "最前一条"
         BeginProperty Font 
            Name            =   "幼圆"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   480
         TabIndex        =   2
         Top             =   480
         Width           =   1215
      End
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   2415
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   7335
      _ExtentX        =   12938
      _ExtentY        =   4260
      _Version        =   393216
      AllowUpdate     =   0   'False
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         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
End
Attribute VB_Name = "FrmUsers"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public rs As ADODB.Recordset
Private Sub Command1_Click()
On Error Resume Next
     rs.MoveFirst
     If rs.BOF Then
        MsgBox "您正在查看的是第一条数据"
    End If
    Call aa
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Command3_Click()
    frmuserxg.Caption = "添加管理员"
    frmuserxg.Show vbModal
End Sub

Private Sub Command4_Click()
    frmuserxg.Caption = "修改管理员"
    frmuserxg.SkinLabel3.Caption = "新的密码"
    frmuserxg.txtname1.Text = rs.Fields("管理员").Value
    If frmuserxg.txtname1.Text = "admin" Then
        frmuserxg.txtname.Text = "admin"
        frmuserxg.txtname.Enabled = False
        frmuserxg.cmgqk.Enabled = False
        MsgBox "无法修改此用户名" & Chr(13) & "可以修改它的密码!"
    End If
    If frmuserxg.txtname1.Text = "youke" Then
        frmuserxg.txtname.Text = "youke"
        frmuserxg.txtname.Enabled = False
        frmuserxg.txtmm.Text = "1234"
        frmuserxg.txtmm.Enabled = False
        frmuserxg.txtmm1.Text = "1234"
        frmuserxg.txtmm1.Enabled = False
        frmuserxg.cmgqk.Enabled = False
        MsgBox "无法修改此用户!"
    End If
    frmuserxg.Show vbModal
End Sub

Private Sub Command5_Click()
If txtname.Text = "admin" Or txtname = "youke" Then
    MsgBox "此用户名是无法删除的!"
Else
    If MsgBox("确定要删除么?", vbOKCancel) = vbOK Then
        rs.Delete
        rs.MoveFirst
        MsgBox "删除成功"
    End If
End If

End Sub

Private Sub Command6_Click()
   On Error Resume Next
    rs.MoveLast
    If rs.EOF Then
        MsgBox "您正在查看的是最后一条数据"
    End If
    Call aa
End Sub

Private Sub Command7_Click()
    On Error Resume Next
    rs.MoveNext
    If rs.EOF Then
        MsgBox "您正在查看的是最后一条数据"
        rs.MoveLast
    End If
    Call aa
End Sub

Private Sub Command8_Click()
    On Error Resume Next
     rs.MovePrevious
     If rs.BOF Then
        MsgBox "您正在查看的是第一条数据"
        rs.MoveFirst
    End If
    Call aa
End Sub

Private Sub Form_Load()
    Call showskin(Skin1, hwnd)
    Set rs = search("select * from gly")
    Set DataGrid1.DataSource = rs
    Call aa
End Sub
Public Sub aa()
    txtname.Text = rs.Fields("管理员").Value
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -