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

📄 compare.frm

📁 这是为一个扫描枪写的在生产线上比较2个不同的2个串口条玛的程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Compare 
   Caption         =   "兄弟工业(深圳)有限公司条码识别系统-条码校对窗口"
   ClientHeight    =   4605
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   10650
   Icon            =   "Compare.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   4605
   ScaleWidth      =   10650
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "重新扫描"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   8640
      TabIndex        =   7
      Top             =   360
      Width           =   1695
   End
   Begin VB.PictureBox Picture2 
      Height          =   1935
      Left            =   1680
      Picture         =   "Compare.frx":06EA
      ScaleHeight     =   1875
      ScaleWidth      =   1875
      TabIndex        =   6
      Top             =   2400
      Width           =   1935
   End
   Begin VB.PictureBox Picture1 
      Height          =   1935
      Left            =   1680
      Picture         =   "Compare.frx":4506
      ScaleHeight     =   1875
      ScaleWidth      =   1875
      TabIndex        =   4
      Top             =   2400
      Width           =   1935
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   1680
      TabIndex        =   0
      Top             =   1320
      Width           =   8655
   End
   Begin VB.CommandButton Command1 
      Caption         =   "重新定义"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   6720
      TabIndex        =   8
      Top             =   360
      Width           =   1695
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "成功!"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   36
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   720
      Left            =   5760
      TabIndex        =   5
      Top             =   3000
      Width           =   2205
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "比较条码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   315
      Left            =   120
      TabIndex        =   3
      Top             =   1560
      Width           =   1650
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Label2"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   1680
      TabIndex        =   2
      Top             =   480
      Width           =   1080
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "定义条码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   315
      Left            =   120
      TabIndex        =   1
      Top             =   480
      Width           =   1650
   End
End
Attribute VB_Name = "Compare"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  Unload Me
  Define.Show
End Sub

Private Sub Command2_Click()
  Text1.Enabled = True
  Text1.Locked = False
  Text1.SetFocus
  SendKeys "{home}+{end}"
End Sub

Private Sub Form_Load()
  Label2.Caption = str
  Picture1.Visible = False
  Picture2.Visible = False
  Label4.Caption = ""
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
   If KeyAscii = 13 Then
      If Trim(Text1.Text) <> Trim(Label2.Caption) Then
          Picture2.Visible = True
          Picture1.Visible = False
          Label4.Caption = "失败!"
          MsgBox "条码匹配失败"
          Text1.Text = ""
          Text1.Enabled = False
          Text1.Locked = True
      Else
          Picture1.Visible = True
          Picture2.Visible = False
          Label4.Caption = "成功!"
          Text1.SetFocus
          SendKeys "{home}+{end}"
      End If
    End If
End Sub

⌨️ 快捷键说明

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