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

📄 frmcode.frm

📁 收藏了太量的商品条形码库
💻 FRM
字号:
VERSION 5.00
Object = "{D9347025-9612-11D1-9D75-00C04FCC8CDC}#1.0#0"; "MSBCODE9.OCX"
Begin VB.Form FrmCode 
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   2955
   ClientLeft      =   45
   ClientTop       =   45
   ClientWidth     =   7470
   ControlBox      =   0   'False
   KeyPreview      =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   2955
   ScaleWidth      =   7470
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin BarCode.Command CmdYes 
      Default         =   -1  'True
      Height          =   345
      Left            =   1920
      TabIndex        =   4
      Top             =   2500
      Width           =   795
      _extentx        =   1402
      _extenty        =   609
      icon            =   "FrmCode.frx":0000
      caption         =   "确定(&Y)"
      font            =   "FrmCode.frx":001C
   End
   Begin VB.Frame FraCode 
      Height          =   1800
      Index           =   1
      Left            =   3240
      TabIndex        =   6
      Top             =   60
      Width           =   3615
      Begin VB.ComboBox CbType 
         Height          =   300
         Left            =   960
         Style           =   2  'Dropdown List
         TabIndex        =   14
         Top             =   240
         Width           =   2415
      End
      Begin VB.TextBox TxtBarCode 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   960
         MaxLength       =   13
         TabIndex        =   12
         Top             =   1320
         Width           =   2415
      End
      Begin VB.TextBox TxtArea 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   960
         TabIndex        =   11
         Top             =   960
         Width           =   2415
      End
      Begin VB.TextBox TxtTitle 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   960
         MaxLength       =   30
         TabIndex        =   10
         Top             =   600
         Width           =   2415
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "类  别:"
         Height          =   180
         Left            =   240
         TabIndex        =   13
         Top             =   300
         Width           =   720
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "条形码:"
         Height          =   180
         Left            =   240
         TabIndex        =   9
         Top             =   1365
         Width           =   720
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "名  称:"
         Height          =   180
         Left            =   240
         TabIndex        =   8
         Top             =   645
         Width           =   720
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "产  地:"
         Height          =   180
         Left            =   240
         TabIndex        =   7
         Top             =   1005
         Width           =   720
      End
   End
   Begin BarCode.Command CmdNo 
      Height          =   345
      Left            =   2920
      TabIndex        =   5
      Top             =   2500
      Width           =   795
      _extentx        =   1402
      _extenty        =   609
      icon            =   "FrmCode.frx":0040
      caption         =   "关闭(&C)"
      font            =   "FrmCode.frx":005C
   End
   Begin VB.Frame FraCode 
      Height          =   2295
      Index           =   0
      Left            =   120
      TabIndex        =   0
      Top             =   60
      Width           =   3615
      Begin BARCODELibCtl.BarCodeCtrl BarCode1 
         Height          =   1095
         Left            =   600
         TabIndex        =   3
         Top             =   960
         Width           =   2415
         Style           =   2
         SubStyle        =   0
         Validation      =   0
         LineWeight      =   3
         Direction       =   0
         ShowData        =   1
         Value           =   "4901234567894"
         ForeColor       =   0
         BackColor       =   16777215
      End
      Begin VB.Label LbArea 
         BackStyle       =   0  'Transparent
         Caption         =   "产地:"
         Height          =   180
         Left            =   240
         TabIndex        =   2
         Top             =   600
         Width           =   3060
      End
      Begin VB.Label LbTitle 
         BackStyle       =   0  'Transparent
         Caption         =   "名称:"
         Height          =   180
         Left            =   240
         TabIndex        =   1
         Top             =   240
         Width           =   3060
      End
   End
End
Attribute VB_Name = "FrmCode"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub CmdNo_Click()
Unload Me
End Sub

Private Sub CmdYes_Click()
If TxtTitle.Text = "" Then
    MsgBox "名称不能为空!", 16, "错误"
    TxtTitle.SetFocus
    Exit Sub
End If
If TxtArea.Text = "" Then
    MsgBox "产地不能为空!", 16, "错误"
    TxtArea.SetFocus
    Exit Sub
End If
If TxtBarCode.Text = "" Then
    MsgBox "条形码不能为空!", 16, "错误"
    TxtBarCode.SetFocus
    Exit Sub
End If
If Len(TxtBarCode.Text) < 13 Then
    MsgBox "条形码长度不足!", 16, "错误"
    TxtBarCode.SetFocus
    Exit Sub
End If
If FraCode(1).Tag = "Add" Then
    If AddCode(FrmMain.TV1, CbType.Text, TxtTitle.Text, TxtArea.Text, TxtBarCode.Text) = False Then
        MsgBox "记录有重复!", 16, "错误"
        Exit Sub
    Else
        Call FrmMain.ShowList
        Unload Me
    End If
ElseIf FraCode(1).Tag = "Edit" Then
    If MsgBox("确认要更新此记录吗?", 36, FrmMain.Caption) = vbYes Then
        If EditCode(FrmMain.TV1, CLng(Me.Tag), CbType.Text, TxtTitle.Text, TxtArea.Text, TxtBarCode.Text) = False Then
            MsgBox "找不到此记录!", 16, "错误"
            Exit Sub
        Else
            Call FrmMain.ShowList
            Unload Me
        End If
    End If
End If
End Sub

Private Sub Form_Load()
Me.Icon = FrmMain.Icon
Me.Width = 3930
Me.Height = 3060
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then Unload Me
End Sub

Private Sub TxtBarCode_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And (KeyAscii <> 8) And (KeyAscii <> 3) And (KeyAscii <> 22) Then
KeyAscii = 0
End If
End Sub

⌨️ 快捷键说明

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