form1.frm

来自「条形码打印机说明,VB的实例,GODEX」· FRM 代码 · 共 47 行

FRM
47
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   855
      Left            =   480
      TabIndex        =   0
      Top             =   720
      Width           =   2415
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Declare Sub setup Lib "Ez2000.dll" (ByVal a%, ByVal b%, ByVal c%, ByVal d%, ByVal e%, ByVal f%)
Private Declare Sub openport Lib "Ez2000.dll" (ByVal command$)
Private Declare Sub sendcommand Lib "Ez2000.dll" (ByVal command$)
Private Declare Sub intloadimage Lib "Ez2000.dll" (ByVal filename$, ByVal image_name$, ByVal image_type$)
Private Declare Sub extloadimage Lib "Ez2000.dll" (ByVal filename$, ByVal image_name$, ByVal image_type$)
Private Declare Sub ecTextOut Lib "Ez2000.dll" (ByVal x%, ByVal y%, ByVal b%, ByVal c$, ByVal d$)
Private Declare Sub closeport Lib "Ez2000.dll" ()
Private Sub command1_Click()
Call openport("0")
Call setup(30, 7, 2, 1, 0, 0)
Call sendcommand("W70")
Call sendcommand("^P1")
Call sendcommand("^L")
Call sendcommand("AC,20,60,1,1,1,0,TEST")
Call ecTextOut(20, 10, 34, "标楷体", "中文测试")
Call sendcommand("E")
Call closeport
End Sub


⌨️ 快捷键说明

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