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

📄 alertfrom.frm

📁 用VB做的一个数据库管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form AlertForm 
   AutoRedraw      =   -1  'True
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "报警窗口"
   ClientHeight    =   4725
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7080
   Icon            =   "AlertFrom.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   4725
   ScaleWidth      =   7080
   ShowInTaskbar   =   0   'False
   Begin VB.PictureBox Picture1 
      AutoRedraw      =   -1  'True
      BackColor       =   &H00E0E0E0&
      Height          =   555
      Left            =   60
      ScaleHeight     =   495
      ScaleWidth      =   6900
      TabIndex        =   1
      Top             =   75
      Width           =   6960
      Begin VB.CommandButton PrintCK 
         Caption         =   "打印(&P)"
         Height          =   420
         Left            =   4590
         TabIndex        =   3
         Top             =   30
         Width           =   1140
      End
      Begin VB.CommandButton ExitButton 
         Cancel          =   -1  'True
         Caption         =   "关闭(&C)"
         Height          =   420
         Left            =   5730
         TabIndex        =   2
         Top             =   30
         Width           =   1140
      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       =   &H000000FF&
         Height          =   435
         Index           =   0
         Left            =   750
         TabIndex        =   4
         Top             =   30
         Width           =   2955
      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       =   &H00FFFFFF&
         Height          =   435
         Index           =   1
         Left            =   735
         TabIndex        =   5
         Top             =   30
         Width           =   2955
      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       =   &H00000000&
         Height          =   435
         Index           =   2
         Left            =   765
         TabIndex        =   6
         Top             =   30
         Width           =   2955
      End
   End
   Begin VB.PictureBox Report1 
      Height          =   480
      Left            =   240
      ScaleHeight     =   420
      ScaleWidth      =   1140
      TabIndex        =   7
      Top             =   4800
      Width           =   1200
   End
   Begin MSFlexGridLib.MSFlexGrid Grid2 
      Height          =   3915
      Left            =   45
      TabIndex        =   0
      Top             =   765
      Width           =   6990
      _ExtentX        =   12330
      _ExtentY        =   6906
      _Version        =   393216
      Rows            =   10
      Cols            =   6
      ForeColor       =   255
      BackColorSel    =   12648447
      ForeColorSel    =   255
      BackColorBkg    =   12632256
      AllowBigSelection=   0   'False
      FocusRect       =   0
      ScrollBars      =   2
      SelectionMode   =   1
   End
End
Attribute VB_Name = "AlertForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub ExitButton_Click()
Unload Me
End Sub

Private Sub Form_Load()
AlertForm.Left = (MDIForm1.Width - AlertForm.Width) / 2
AlertForm.Top = (MDIForm1.Height - AlertForm.Height) / 2 - 1000
Dim DB As Database, Ef As Recordset, HH As Integer, TempStr As String
Set DB = OpenDatabase(App.Path & "\Sys\Store.mdb", 0, 0, Constr)
 '配置网格
Grid2.Visible = False
Grid2.Cols = 6
Grid2.FormatString = "^ 序号 |^ 仓库类型 |^ 产品类型 |^ 产品名称 |^ 单位 |^ 数量 "
Grid2.ColWidth(0) = 630
Grid2.ColWidth(1) = 1200
Grid2.ColWidth(2) = 1200
Grid2.ColWidth(3) = 2000
Grid2.ColWidth(4) = 800
Grid2.ColWidth(5) = 800
    Set Ef = DB.OpenRecordset("KcK", dbOpenTable)
        Grid2.Rows = Ef.RecordCount + 15
    Set Ef = DB.OpenRecordset("Select 仓库类型,产品类型,产品名称,单位,数量 From AlKCK", dbOpenDynaset)
        HH = 1
        Do While Not Ef.EOF()
           Grid2.Row = HH
           Grid2.Col = 1
           Grid2.CellAlignment = 1
        If Not IsNull(Ef.Fields(0).Value) Then
           Grid2.Text = Ef.Fields(0).Value
        End If
           Grid2.Row = HH
           Grid2.Col = 2
           Grid2.CellAlignment = 1
        If Not IsNull(Ef.Fields(1).Value) Then
           Grid2.Text = Ef.Fields(1).Value
        End If
           Grid2.Row = HH
           Grid2.Col = 3
           Grid2.CellAlignment = 1
        If Not IsNull(Ef.Fields(2).Value) Then
           Grid2.Text = Ef.Fields(2).Value
        End If
           Grid2.Row = HH
           Grid2.Col = 4
           Grid2.CellAlignment = 1
        If Not IsNull(Ef.Fields(3).Value) Then
           Grid2.Text = Ef.Fields(3).Value
        End If
           Grid2.Row = HH
           Grid2.Col = 5
           Grid2.CellAlignment = 1
        If Not IsNull(Ef.Fields(4).Value) Then
           Grid2.Text = Ef.Fields(4).Value
        End If
          Ef.MoveNext
          HH = HH + 1
        Loop
        DB.Close
For HH = 1 To Grid2.Rows - 1
    Grid2.Row = HH
    Grid2.Col = 0
    Grid2.Text = HH
    If Len(Grid2.Text) = 1 Then
     Grid2.Text = "0" + Grid2.Text
     End If
 Next
 Grid2.Col = 1
 Grid2.Row = 1
 Grid2.ColSel = 5
 Grid2.Visible = True

End Sub

Private Sub PrintCK_Click()
AlertForm.MousePointer = 11
Report1.ReportFileName = Browser + "report\AlertKC.rpt"
Report1.DataFiles(0) = ConData2
Report1.DataFiles(1) = ConData3
On Error Resume Next
Report1.WindowState = crptNormal
Report1.PrintReport
AlertForm.MousePointer = 0
End Sub

⌨️ 快捷键说明

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