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

📄 frmprintbar.frm

📁 VB编写的条码打印控制程序,可使用在ZEBRAZ4M等型号打印机
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Picture         =   "frmPrintBar.frx":5D2E
         Stretch         =   -1  'True
         Top             =   1500
         Width           =   330
      End
      Begin VB.Image Image1 
         Height          =   240
         Index           =   2
         Left            =   645
         Picture         =   "frmPrintBar.frx":6C00
         Stretch         =   -1  'True
         Top             =   1500
         Width           =   330
      End
      Begin VB.Image Image1 
         Height          =   240
         Index           =   1
         Left            =   360
         Picture         =   "frmPrintBar.frx":7AD2
         Stretch         =   -1  'True
         Top             =   1500
         Width           =   330
      End
      Begin VB.Image Image1 
         Height          =   240
         Index           =   0
         Left            =   75
         Picture         =   "frmPrintBar.frx":89A4
         Stretch         =   -1  'True
         Top             =   1500
         Width           =   330
      End
      Begin VB.Label lblBar 
         BackColor       =   &H80000009&
         Caption         =   "Label1"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   5.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   135
         Index           =   0
         Left            =   200
         TabIndex        =   9
         Top             =   405
         Width           =   1815
      End
      Begin VB.Label lblStyleName 
         BackColor       =   &H8000000E&
         Caption         =   "品名:"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   5.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   135
         Index           =   0
         Left            =   120
         TabIndex        =   8
         Top             =   520
         Width           =   2415
      End
      Begin VB.Label lblStandard 
         BackColor       =   &H8000000E&
         Caption         =   "执行标准:"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   5.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   135
         Index           =   0
         Left            =   120
         TabIndex        =   7
         Top             =   645
         Width           =   2295
      End
      Begin BARCODELibCtl.BarCodeCtrl BAR 
         Height          =   375
         Index           =   0
         Left            =   0
         TabIndex        =   6
         Top             =   120
         Width           =   1800
         Style           =   6
         SubStyle        =   -1
         Validation      =   0
         LineWeight      =   3
         Direction       =   0
         ShowData        =   0
         Value           =   "*123456 CODE-39*"
         ForeColor       =   0
         BackColor       =   16777215
      End
      Begin VB.Label lblSpec 
         BackColor       =   &H8000000E&
         Caption         =   "规格:"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   5.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   135
         Index           =   0
         Left            =   120
         TabIndex        =   5
         Top             =   890
         Width           =   2295
      End
      Begin VB.Label lblGrade 
         BackColor       =   &H8000000E&
         Caption         =   "质量等级:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   5.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   135
         Index           =   0
         Left            =   120
         TabIndex        =   4
         Top             =   775
         Width           =   2415
      End
      Begin VB.Label lblMl 
         BackColor       =   &H8000000E&
         Caption         =   "面料:"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   5.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   135
         Index           =   0
         Left            =   120
         TabIndex        =   3
         Top             =   1120
         Width           =   2295
      End
      Begin VB.Label lblChecker 
         BackColor       =   &H8000000E&
         Caption         =   "检验员:"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   5.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   135
         Index           =   0
         Left            =   120
         TabIndex        =   2
         Top             =   1000
         Width           =   2415
      End
      Begin VB.Label Label3 
         BackColor       =   &H80000009&
         Caption         =   "洗涤方法"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   6.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Index           =   0
         Left            =   120
         TabIndex        =   1
         Top             =   1305
         Width           =   855
      End
   End
End
Attribute VB_Name = "frmPrintBar"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit




Private Sub Form_Load()
'Combo1.AddItem "0 - UPC-A"
'Combo1.AddItem "1 - UPC-E"
'Combo1.AddItem "2 - EAN-13"
'Combo1.AddItem "3 - EAN-8"
'Combo1.AddItem "4 - CASE CODE"
'Combo1.AddItem "5 - CODABARE"
'Combo1.AddItem "6 - CODE-39"
'Combo1.AddItem "7 - CODE-128"
'Combo1.AddItem "8 - U.S.POSTNET"
'Combo1.AddItem "9 - U.S.POSTAL FIM"
'Combo1.AddItem "10 - JP POST"

Dim i As Integer, j     As Integer
Dim strMl       As String, strLl    As String


'bar的style为2,6,显示正常,6为最好
BAR(0).Refresh
BAR(0).Style = 2    '6 - CODE-39
BAR(0).Value = frmBar.m_strStyle
BAR(0).ShowData = 0        '不显示数字

lblBar(0).Caption = frmBar.m_strStyle & " RMB:¥" & Format(frmBar.txtPrice.Text, "##.00") & "元"

lblStyleName(0).Caption = lblStyleName(0).Caption & frmBar.txtTypeName.Text
lblStandard(0).Caption = lblStandard(0).Caption & frmBar.cmbStandard.Text
lblGrade(0).Caption = lblGrade(0).Caption & frmBar.cmbGrade.Text
lblSpec(0).Caption = lblSpec(0).Caption & frmBar.txtSpec.Text
lblChecker(0).Caption = lblChecker(0).Caption & frmBar.txtChecker.Text

With frmBar

strMl = IIf(.cmbMl1.Text <> "", .cmbMl1.Text & .txtCf1.Text & "%", "") & _
        IIf(.cmbMl2.Text <> "", .cmbMl2.Text & .txtCf2.Text & "%", "") & _
        IIf(.cmbMl3.Text <> "", .cmbMl3.Text & .txtCf3.Text & "%", "") & _
        IIf(.cmbMl4.Text <> "", .cmbMl4.Text & .txtCf4.Text & "%", "")
        
strLl = IIf(.cmbLl1.Text <> "", .cmbLl1.Text & .txtLlCf1.Text & "%", "") & _
        IIf(.cmbLl2.Text <> "", .cmbLl2.Text & .txtLlCf2.Text & "%", "")
        
End With
lblMl(0).Caption = lblMl(0).Caption & strMl
lblLl(0).Caption = IIf(strLl = "", "", lblLl(0).Caption & strLl)


For i = 0 To 4
    Set Image1(i) = frmBar.Picture1(i)
Next i






BAR(1).Refresh
BAR(1).Style = 2   '6 - CODE-39
BAR(1).Value = frmBar.m_strStyle
BAR(1).ShowData = 0        '不显示数字

lblBar(1).Caption = frmBar.m_strStyle & " RMB:¥" & Format(frmBar.txtPrice.Text, "##.00") & "元"

lblStyleName(1).Caption = lblStyleName(1).Caption & frmBar.txtTypeName.Text
lblStandard(1).Caption = lblStandard(1).Caption & frmBar.cmbStandard.Text
lblGrade(1).Caption = lblGrade(1).Caption & frmBar.cmbGrade.Text
lblSpec(1).Caption = lblSpec(1).Caption & frmBar.txtSpec.Text
lblChecker(1).Caption = lblChecker(1).Caption & frmBar.txtChecker.Text

With frmBar

strMl = IIf(.cmbMl1.Text <> "", .cmbMl1.Text & .txtCf1.Text & "%", "") & _
        IIf(.cmbMl2.Text <> "", .cmbMl2.Text & .txtCf2.Text & "%", "") & _
        IIf(.cmbMl3.Text <> "", .cmbMl3.Text & .txtCf3.Text & "%", "") & _
        IIf(.cmbMl4.Text <> "", .cmbMl4.Text & .txtCf4.Text & "%", "")
        
strLl = IIf(.cmbLl1.Text <> "", .cmbLl1.Text & .txtLlCf1.Text & "%", "") & _
        IIf(.cmbLl2.Text <> "", .cmbLl2.Text & .txtLlCf2.Text & "%", "")
        
End With
lblMl(1).Caption = lblMl(1).Caption & strMl
lblLl(1).Caption = IIf(strLl = "", "", lblLl(1).Caption & strLl)

j = 5
For i = 0 To 4
    
    Set Image1(j) = frmBar.Picture1(i)
    j = j + 1
Next i

End Sub

⌨️ 快捷键说明

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