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

📄 frmfinddisplay.frm

📁 档案管理系统使用说明 0.超越VB的界面
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{00025600-0000-0000-C000-000000000046}#4.6#0"; "CRYSTL32.OCX"
Begin VB.Form frmFindDisplay 
   AutoRedraw      =   -1  'True
   Caption         =   "查询记录显示处:"
   ClientHeight    =   6870
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   10440
   Icon            =   "frmFindDisplay.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   6870
   ScaleWidth      =   10440
   WindowState     =   2  'Maximized
   Begin Crystal.CrystalReport Report1 
      Left            =   7185
      Top             =   -495
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   262150
   End
   Begin VB.PictureBox Picture1 
      AutoRedraw      =   -1  'True
      BackColor       =   &H00808000&
      Height          =   990
      Left            =   180
      ScaleHeight     =   930
      ScaleWidth      =   6870
      TabIndex        =   5
      Top             =   105
      Width           =   6930
      Begin VB.CommandButton PrintAll 
         Caption         =   "打印查询"
         Height          =   930
         Left            =   945
         Picture         =   "frmFindDisplay.frx":08CA
         Style           =   1  'Graphical
         TabIndex        =   2
         Top             =   0
         Width           =   945
      End
      Begin VB.CommandButton ExitB 
         Cancel          =   -1  'True
         Caption         =   "关闭(&E)"
         Height          =   930
         Left            =   2835
         Picture         =   "frmFindDisplay.frx":0BD4
         Style           =   1  'Graphical
         TabIndex        =   4
         Top             =   0
         Width           =   945
      End
      Begin VB.CommandButton PrintFind 
         Caption         =   "打印所有"
         Height          =   930
         Left            =   1890
         Picture         =   "frmFindDisplay.frx":0EDE
         Style           =   1  'Graphical
         TabIndex        =   3
         Top             =   0
         Width           =   945
      End
      Begin VB.CommandButton ContinueB 
         Caption         =   "继续(&R)"
         Height          =   930
         Left            =   0
         Picture         =   "frmFindDisplay.frx":11E8
         Style           =   1  'Graphical
         TabIndex        =   1
         Top             =   0
         Width           =   945
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "查询信息显示处"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   21.75
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FF00&
         Height          =   435
         Left            =   3090
         TabIndex        =   6
         Top             =   240
         Width           =   3165
      End
   End
   Begin MSFlexGridLib.MSFlexGrid Grid1 
      Height          =   5550
      Left            =   150
      TabIndex        =   0
      Top             =   1185
      Width           =   10170
      _ExtentX        =   17939
      _ExtentY        =   9790
      _Version        =   393216
      BackColorSel    =   65535
      ForeColorSel    =   255
      BackColorBkg    =   12632256
      AllowBigSelection=   0   'False
      FocusRect       =   0
      ScrollBars      =   2
      SelectionMode   =   1
      AllowUserResizing=   1
   End
End
Attribute VB_Name = "frmFindDisplay"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub ContinueB_Click()
  Unload Me
  frmSearchGuest.Show
  Exit Sub
End Sub

Private Sub ExitB_Click()
 Unload Me
 Exit Sub
End Sub

Private Sub Form_Load()
Dim DB As Database, Ef As Recordset, HH As Integer, TempStr As String
 '配置查询库
    Set DB = OpenDatabase(Browser + "data\file.MDB", False, False, ConStr)
        TempStr = "Delete * From MainPrint"
        DB.Execute TempStr
        TempStr = "Insert into MainPrint select * From Main Where " & PublicFindstr
        DB.Execute TempStr
 '配置网格
Grid1.Visible = False
Grid1.Cols = 9
Grid1.FormatString = "^ 序号 |^ 文件类型 |^ 姓名 |^ 公司名称 |^ 电话 |^ 传真 |^ 所在城市 |^ 地址 |^ 邮编 "
Grid1.ColWidth(0) = 600
Grid1.ColWidth(1) = 1000
Grid1.ColWidth(2) = 940
Grid1.ColWidth(3) = 2000
Grid1.ColWidth(4) = 1800
Grid1.ColWidth(5) = 1000
Grid1.ColWidth(6) = 1200
Grid1.ColWidth(7) = 1800
Grid1.ColWidth(8) = 1200
    Set Ef = DB.OpenRecordset("Detail", dbOpenTable)
        Grid1.Rows = Ef.RecordCount + 8
    Set Ef = DB.OpenRecordset("Select 文件类型,文件姓名,公司名称,公司电话,公司传真,所在城市,公司地址,邮政编码 From Main Where " & PublicFindstr, dbOpenDynaset)
        HH = 1
        Do While Not Ef.EOF()
           Grid1.Row = HH
           Grid1.Col = 1
           Grid1.CellAlignment = 1
        If Not IsNull(Ef.Fields(0).Value) Then
           Grid1.Text = Ef.Fields(0).Value
        End If
           Grid1.Row = HH
           Grid1.Col = 2
           Grid1.CellAlignment = 1
        If Not IsNull(Ef.Fields(1).Value) Then
           Grid1.Text = Ef.Fields(1).Value
        End If
           Grid1.Row = HH
           Grid1.Col = 3
           Grid1.CellAlignment = 1
        If Not IsNull(Ef.Fields(2).Value) Then
           Grid1.Text = Ef.Fields(2).Value
        End If
           Grid1.Row = HH
           Grid1.Col = 4
           Grid1.CellAlignment = 1
        If Not IsNull(Ef.Fields(3).Value) Then
           Grid1.Text = Ef.Fields(3).Value
        End If
           Grid1.Row = HH
           Grid1.Col = 5
           Grid1.CellAlignment = 1
        If Not IsNull(Ef.Fields(4).Value) Then
           Grid1.Text = Ef.Fields(4).Value
        End If
           Grid1.Row = HH
           Grid1.Col = 6
           Grid1.CellAlignment = 1
        If Not IsNull(Ef.Fields(5).Value) Then
           Grid1.Text = Ef.Fields(5).Value
        End If
           Grid1.Row = HH
           Grid1.Col = 7
           Grid1.CellAlignment = 1
        If Not IsNull(Ef.Fields(6).Value) Then
           Grid1.Text = Ef.Fields(6).Value
        End If
           Grid1.Row = HH
           Grid1.Col = 8
           Grid1.CellAlignment = 1
        If Not IsNull(Ef.Fields(7).Value) Then
           Grid1.Text = Ef.Fields(7).Value
        End If
          Ef.MoveNext
          HH = HH + 1
        Loop
        DB.Close
For HH = 1 To Grid1.Rows - 1
    Grid1.Row = HH
    Grid1.Col = 0
    Grid1.Text = HH
    If Len(Grid1.Text) = 1 Then
     Grid1.Text = "0" + Grid1.Text
     End If
 Next
 Grid1.Col = 1
 Grid1.Row = 1
 Grid1.ColSel = 8
 Grid1.Visible = True
End Sub

Private Sub Form_Resize()
Picture1.Width = Me.Width - 450
Label1.Left = Picture1.Width / 2 + 200
Grid1.Width = Me.Width - 440
Grid1.Height = Me.ScaleHeight - Picture1.Height - 300
End Sub

Private Sub Form_Unload(Cancel As Integer)
  Unload frmSearchGuest
End Sub

Private Sub Grid1_DblClick()
If Grid1.MouseCol = 0 Or Grid1.MouseRow = 0 Then Exit Sub
   Dim RN As Single
       RN = Grid1.Row
   PublicFindstr = Grid1.TextMatrix(RN, 2)
If PublicFindstr = "" Then Exit Sub
   frmFindDisplay.MousePointer = 11
      frmGuestDisplay.Show 1
   frmFindDisplay.MousePointer = 0
End Sub

Private Sub PrintAll_Click()
frmFindDisplay.MousePointer = 11
Report1.ReportFileName = Browser + "report\GUESTF.rpt"
Report1.DataFiles(0) = Browser + "SYS\GUEST.MDB"
Report1.DataFiles(1) = Browser + "SYS\DATA.MDB"
On Error Resume Next
Report1.WindowState = crptNormal
Report1.PrintReport
frmFindDisplay.MousePointer = 0

End Sub

Private Sub PrintFind_Click()
frmFindDisplay.MousePointer = 11
Report1.ReportFileName = Browser + "report\GUEST.rpt"
Report1.DataFiles(0) = Browser + "SYS\GUEST.MDB"
Report1.DataFiles(1) = Browser + "SYS\DATA.MDB"
On Error Resume Next
Report1.WindowState = crptNormal
Report1.PrintReport
frmFindDisplay.MousePointer = 0

End Sub

⌨️ 快捷键说明

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