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

📄 frmsplog.frm

📁 超市的管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "msflxgrd.ocx"
Begin VB.Form frmSPlog 
   AutoRedraw      =   -1  'True
   BackColor       =   &H00FFFFC0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "厂商登记"
   ClientHeight    =   8475
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   12240
   Icon            =   "frmSPlog.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   8475
   ScaleWidth      =   12240
   Begin VB.CommandButton CmdSave 
      Caption         =   "保 存(&S)"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   10200
      TabIndex        =   16
      Top             =   6000
      Width           =   1695
   End
   Begin VB.CommandButton CmdExit 
      Caption         =   "退 出(&S)"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   10200
      TabIndex        =   15
      Top             =   7080
      Width           =   1695
   End
   Begin VB.CommandButton CmdDelete 
      Caption         =   "删 除(&D)"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   7920
      TabIndex        =   9
      Top             =   7320
      Width           =   1575
   End
   Begin VB.CommandButton CmdInput 
      Caption         =   "输 入(&I)"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   7920
      TabIndex        =   8
      Top             =   6600
      Width           =   1575
   End
   Begin VB.CommandButton CmdClear 
      Caption         =   "清 空(&C)"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   7920
      TabIndex        =   7
      Top             =   5880
      Width           =   1575
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00FFFFC0&
      Height          =   2520
      Left            =   240
      TabIndex        =   10
      Top             =   5520
      Width           =   9500
      Begin VB.TextBox TxtBA 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   350
         Left            =   5040
         TabIndex        =   6
         Top             =   1320
         Width           =   2175
      End
      Begin VB.TextBox TxtPhone 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   350
         Left            =   5040
         TabIndex        =   5
         Top             =   900
         Width           =   2175
      End
      Begin VB.TextBox TxtState 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   350
         Left            =   5040
         TabIndex        =   4
         Top             =   420
         Width           =   2175
      End
      Begin VB.TextBox txtCity 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   350
         Left            =   1440
         TabIndex        =   3
         Top             =   1860
         Width           =   2175
      End
      Begin VB.TextBox txtAddress 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   350
         Left            =   1440
         TabIndex        =   2
         Top             =   1380
         Width           =   2175
      End
      Begin VB.TextBox txtName 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   350
         Left            =   1440
         TabIndex        =   1
         Top             =   900
         Width           =   2175
      End
      Begin VB.TextBox txtID 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   350
         Left            =   1440
         TabIndex        =   0
         Top             =   420
         Width           =   2175
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "银行帐号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   3960
         TabIndex        =   21
         Top             =   1440
         Width           =   960
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "电话号码"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   3960
         TabIndex        =   20
         Top             =   960
         Width           =   960
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "省份"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   3960
         TabIndex        =   19
         Top             =   480
         Width           =   480
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "城市"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   360
         TabIndex        =   14
         Top             =   1920
         Width           =   480
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "地址"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   360
         TabIndex        =   13
         Top             =   1440
         Width           =   480
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "厂商名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   360
         TabIndex        =   12
         Top             =   960
         Width           =   960
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "厂商编号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   360
         TabIndex        =   11
         Top             =   480
         Width           =   960
      End
   End
   Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
      Height          =   3975
      Left            =   240
      TabIndex        =   17
      Top             =   1320
      Width           =   11775
      _ExtentX        =   20770
      _ExtentY        =   7011
      _Version        =   393216
      Cols            =   8
      FixedCols       =   0
      WordWrap        =   -1  'True
      AllowUserResizing=   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "厂  商  信  息  登  记"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   24
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   480
      Left            =   3480
      TabIndex        =   18
      Top             =   480
      Width           =   5280
   End
End
Attribute VB_Name = "frmSPlog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim n As Integer                                                    '声明表格中序号变量

Dim rct As New ADODB.Recordset                                      '声明连接到厂商表的记录集

Private Sub flexView()                                              '初始条件的表格显示

    Dim intindex As Integer

    MSFlexGrid1.ColWidth(0) = 12 * 25 * 4
    
    MSFlexGrid1.ColWidth(1) = 12 * 25 * 6
    
    MSFlexGrid1.ColWidth(2) = 12 * 25 * 9
    
    MSFlexGrid1.ColWidth(3) = 12 * 25 * 9
    
    MSFlexGrid1.ColWidth(4) = 12 * 25 * 4
    
    MSFlexGrid1.ColWidth(5) = 12 * 25 * 4
    
    MSFlexGrid1.ColWidth(6) = 12 * 25 * 6
    
    MSFlexGrid1.ColWidth(7) = 12 * 25 * 6
    
    MSFlexGrid1.Row = 0
    
    For intindex = 0 To 7
    
        MSFlexGrid1.Col = intindex
        
        MSFlexGrid1.CellAlignment = 4
        
        MSFlexGrid1.CellFontBold = True
        
    Next intindex
    
    MSFlexGrid1.TextMatrix(0, 0) = "序号"
    
    MSFlexGrid1.TextMatrix(0, 1) = "厂商编号"
    
    MSFlexGrid1.TextMatrix(0, 2) = "厂商名称"
    
    MSFlexGrid1.TextMatrix(0, 3) = "地址"
    
    MSFlexGrid1.TextMatrix(0, 4) = "城市"
    
    MSFlexGrid1.TextMatrix(0, 5) = "省份"
    
    MSFlexGrid1.TextMatrix(0, 6) = "电话号码"
    
    MSFlexGrid1.TextMatrix(0, 7) = "银行帐号"

End Sub

Private Sub CmdClear_Click()

    n = 0
    
    MSFlexGrid1.Clear
    
    Dim X As Integer

    Dim Y As Integer

    Y = 1

    X = MSFlexGrid1.Rows - 1

    For Y = X To 2 Step -1                                    '用循环依次删除所有记录

        MSFlexGrid1.RemoveItem (Y)

    Next Y

    Call flexView
    
    CmdClear.Enabled = False
                                                             '清空后返回初始条件的显示
    rct.MoveLast
        
    txtID.Text = "g" & Val(Right(Trim(rct.Fields.Item(0).Value), 4)) + 1
            
    txtName.Text = ""
    
    txtAddress.Text = ""
    
    txtCity.Text = ""
    
    TxtState.Text = ""
    
    TxtPhone.Text = ""
    
    TxtBA.Text = ""
    
    txtName.SetFocus

End Sub

Private Sub CmdDelete_Click()

    Dim intindex As Integer
    
    If MSFlexGrid1.Rows > 2 Then
    
        For intindex = MSFlexGrid1.Row To MSFlexGrid1.Rows - 2
            
            MSFlexGrid1.TextMatrix(intindex, 2) = MSFlexGrid1.TextMatrix(intindex + 1, 2)
            
            MSFlexGrid1.TextMatrix(intindex, 3) = MSFlexGrid1.TextMatrix(intindex + 1, 3)
            
            MSFlexGrid1.TextMatrix(intindex, 4) = MSFlexGrid1.TextMatrix(intindex + 1, 4)
            
            MSFlexGrid1.TextMatrix(intindex, 5) = MSFlexGrid1.TextMatrix(intindex + 1, 5)
            
            MSFlexGrid1.TextMatrix(intindex, 6) = MSFlexGrid1.TextMatrix(intindex + 1, 6)
            
            MSFlexGrid1.TextMatrix(intindex, 7) = MSFlexGrid1.TextMatrix(intindex + 1, 7)
            
        Next intindex
        
        MSFlexGrid1.RemoveItem (MSFlexGrid1.Rows - 2)
        
        If MSFlexGrid1.Rows > 2 Then                          '删除表格中记录后,厂商编号返回到最小可用编号
        
            txtID.Text = "g" & Val(Right(Trim(MSFlexGrid1.TextMatrix((MSFlexGrid1.Rows - 2), 1)), 4)) + 1
            
        Else

⌨️ 快捷键说明

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