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

📄 xkdisp.frm

📁 这是一个完整的企业信息管理系统的源码,系统功能丰富,操作方便
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form xkdisp 
   Caption         =   "刷卡记录"
   ClientHeight    =   3195
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   7110
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   7110
   StartUpPosition =   3  '窗口缺省
   Begin MSFlexGridLib.MSFlexGrid xkGrid 
      Height          =   3135
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   6135
      _ExtentX        =   10821
      _ExtentY        =   5530
      _Version        =   393216
   End
   Begin VB.Menu menuPrint 
      Caption         =   "打印"
   End
End
Attribute VB_Name = "xkdisp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mrc As ADODB.Recordset
Public txtSQL As String
Dim MsgText As String

Private Sub Form_Load()
    ShowTitle
    ShowData

    
End Sub

Private Sub Form_Resize()
    If Me.WindowState <> vbMinimized And fMainForm.WindowState <> vbMinimized Then
                    
        xkGrid.Top = 0
        xkGrid.Width = Me.ScaleWidth - 200
        xkGrid.Left = Me.ScaleLeft + 100
        xkGrid.Height = Me.ScaleHeight - 200
    End If
End Sub



Public Sub FormClose()
    Unload Me
End Sub
Public Sub ShowData()
    Dim j As Integer
    Dim i As Integer
    txtSQL = "select * from skjl"
    Set mrc = ExecuteSQL(txtSQL, MsgText)
    If mrc.EOF = False Then
        With xkGrid
        .Rows = 1
        Do While Not mrc.EOF
            .Rows = .Rows + 1
            If mrc.Fields(0).Value Then .TextMatrix(.Rows - 1, 1) = mrc.Fields(0).Value
            If mrc.Fields(1).Value Then .TextMatrix(.Rows - 1, 2) = mrc.Fields(1).Value
            If mrc.Fields(2).Value Then .TextMatrix(.Rows - 1, 3) = mrc.Fields(2).Value
            If mrc.Fields(3).Value Then .TextMatrix(.Rows - 1, 4) = mrc.Fields(3).Value
            If mrc.Fields(4).Value Then .TextMatrix(.Rows - 1, 5) = mrc.Fields(4).Value
            If mrc.Fields(5).Value Then .TextMatrix(.Rows - 1, 6) = mrc.Fields(5).Value
            If mrc.Fields(6).Value Then .TextMatrix(.Rows - 1, 7) = mrc.Fields(6).Value
            If mrc.Fields(7).Value Then .TextMatrix(.Rows - 1, 8) = mrc.Fields(7).Value
         
            mrc.MoveNext
        Loop
        End With
    End If
    mrc.Close
End Sub


'显示Grid表头
Public Sub ShowTitle()
    Dim i As Integer
    
    With xkGrid
        .Cols = 9
        .TextMatrix(0, 1) = "编号"
        .TextMatrix(0, 2) = "日期"
        .TextMatrix(0, 3) = "早上班时间"
        .TextMatrix(0, 4) = "早下班时间"
        .TextMatrix(0, 5) = "午上班时间"
        .TextMatrix(0, 6) = "午下班时间"
        .TextMatrix(0, 7) = "晚上班时间"
        .TextMatrix(0, 8) = "晚下班时间"
        '固定表头
        .FixedRows = 1
      
       
        '表头项居中
        .FillStyle = flexFillRepeat
        .Col = 0
        .Row = 0
        .RowSel = 1
        .ColSel = .Cols - 1
        .CellAlignment = 4
        '设置单元大小
        .ColWidth(0) = 100
        .ColWidth(1) = 1000
        .ColWidth(2) = 1000
        .ColWidth(3) = 1000
        .ColWidth(4) = 1000
        .ColWidth(5) = 1000
        .ColWidth(6) = 1000
        .ColWidth(7) = 1000
        .ColWidth(8) = 1000
        
        .Row = 1
    End With
End Sub

Private Sub menuPrint_Click()

  End Sub



⌨️ 快捷键说明

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