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

📄 frm_zj.frm

📁 公寓信息管理系统: 公寓的住宿、 退房等 水电费管理
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frm_zj 
   Caption         =   "Form1"
   ClientHeight    =   7005
   ClientLeft      =   60
   ClientTop       =   405
   ClientWidth     =   9780
   LinkTopic       =   "Form1"
   Picture         =   "frm_zj.frx":0000
   ScaleHeight     =   7005
   ScaleWidth      =   9780
   StartUpPosition =   3  '窗口缺省
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   0
      Top             =   6630
      Width           =   9780
      _ExtentX        =   17251
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   1
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   16775
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   7320
      Top             =   2520
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   48
      ImageHeight     =   48
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   9
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_zj.frx":1CED2
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_zj.frx":1D918
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_zj.frx":1E3AA
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_zj.frx":1EED3
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_zj.frx":1FA4D
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_zj.frx":20091
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_zj.frx":22512
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_zj.frx":22B3D
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_zj.frx":23163
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   1050
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   9780
      _ExtentX        =   17251
      _ExtentY        =   1852
      ButtonWidth     =   1561
      ButtonHeight    =   1799
      Appearance      =   1
      Style           =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   12
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "新建"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "修改"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "删除"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "查询"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "首记录"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "末记录"
            ImageIndex      =   6
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "上一条"
            ImageIndex      =   7
         EndProperty
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "下一条"
            ImageIndex      =   8
         EndProperty
         BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "取消/退出"
            ImageIndex      =   9
         EndProperty
      EndProperty
   End
   Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
      Height          =   4455
      Left            =   -120
      TabIndex        =   2
      Top             =   1200
      Width           =   6975
      _ExtentX        =   12303
      _ExtentY        =   7858
      _Version        =   393216
      BackColor       =   16777152
      ForeColor       =   16761087
      BackColorFixed  =   16761024
      ForeColorFixed  =   -2147483636
      BackColorSel    =   -2147483634
      BackColorBkg    =   14737632
      AllowUserResizing=   3
   End
End
Attribute VB_Name = "frm_zj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Form_Load()
Dim sql As String
sql = "select  学生.姓名,性别,寝室编号,早检 from 早检,学生 where 早检.姓名=学生.姓名" '改变数据来源
ShowData sql, Me.MSFlexGrid1
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
  Case 1
        Frm_xsgx.Caption = "添加记录"
        Frm_xsgx.Show 1
        Me.StatusBar1.Panels(1).Text = "总行数为:" & Me.MSFlexGrid1.Rows - 1 '不能用加号,因为加号连接的两边必须全为字符串
  Case 2
        With Frm_xsgx
        .Caption = "修改记录"
        .Txt_zydm.Text = Me.MSFlexGrid1.TextMatrix(Me.MSFlexGrid1.Row, 0)
        .Txt_zymc.Text = Me.MSFlexGrid1.TextMatrix(Me.MSFlexGrid1.Row, 1)
        .Txt_xbdm.Text = Me.MSFlexGrid1.TextMatrix(Me.MSFlexGrid1.Row, 2)
        
   
        .Show 1
        End With
  Case 3 '改变2
        If MsgBox("你确定要删除记录吗?", vbYesNo + vbQuestion, "询问") = vbYes Then
            Dim sql As String, rtn As Long
                sql = "delete 宿舍 where 姓名='" + Me.MSFlexGrid1.TextMatrix(Me.MSFlexGrid1.Row, 0) + "'" '动静分离(2)改变删除操作
                rtn = Update(sql)
            If rtn = 0 Then
                MsgBox "删除成功!"
                sql = "select * from 宿舍"
                ShowData sql, Me.MSFlexGrid1
            Else
                MsgBox "出现系统错误!   请重启本系统!"
            End If
       End If
            Me.StatusBar1.Panels(1).Text = "总行数为:" & Me.MSFlexGrid1.Rows - 1 '不能用加号,因为加号连接的两边必须全为字符串
  Case 5
         Frm_xscz.Show 1
  Case 7
          MoveFirst Me.MSFlexGrid1
  Case 8
           MoveLast Me.MSFlexGrid1
  Case 9
           MovePre Me.MSFlexGrid1
  Case 10
           MoveNext Me.MSFlexGrid1
 
  Case 12
           Unload Me
End Select

End Sub

⌨️ 快捷键说明

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