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

📄 dialog.frm

📁 UPC-EA 类型条形码生成和读取示例
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Dialog 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Dialog Caption"
   ClientHeight    =   2955
   ClientLeft      =   2760
   ClientTop       =   3825
   ClientWidth     =   6000
   FillColor       =   &H00FFFFFF&
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2955
   ScaleWidth      =   6000
   StartUpPosition =   1  'CenterOwner
   Begin VB.PictureBox Picture1 
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      Height          =   2010
      Left            =   150
      Picture         =   "Dialog.frx":0000
      ScaleHeight     =   130
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   285
      TabIndex        =   4
      Top             =   4110
      Visible         =   0   'False
      Width           =   4335
   End
   Begin VB.Timer Timer1 
      Interval        =   100
      Left            =   4230
      Top             =   1320
   End
   Begin VB.CommandButton OKButton 
      Appearance      =   0  'Flat
      Caption         =   "确定"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      Left            =   4605
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   2430
      Width           =   1200
   End
   Begin VB.PictureBox Picture3 
      Height          =   2070
      Left            =   120
      ScaleHeight     =   2010
      ScaleWidth      =   5640
      TabIndex        =   1
      Top             =   120
      Width           =   5700
      Begin VB.Label Label2 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Label2"
         BeginProperty Font 
            Name            =   "Terminal"
            Size            =   6
            Charset         =   255
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   375
         Left            =   2505
         TabIndex        =   3
         Top             =   120
         Width           =   2895
      End
      Begin VB.Label Label1 
         Caption         =   "Label1"
         BeginProperty Font 
            Name            =   "Terminal"
            Size            =   6
            Charset         =   255
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1395
         Left            =   2535
         TabIndex        =   2
         Top             =   480
         Width           =   3000
      End
   End
   Begin VB.Line Line4 
      BorderColor     =   &H80000005&
      X1              =   0
      X2              =   0
      Y1              =   0
      Y2              =   2040
   End
   Begin VB.Line Line3 
      BorderColor     =   &H80000005&
      X1              =   0
      X2              =   4920
      Y1              =   0
      Y2              =   0
   End
   Begin VB.Line Line2 
      BorderWidth     =   2
      X1              =   5955
      X2              =   5955
      Y1              =   90
      Y2              =   2250
   End
   Begin VB.Line Line1 
      BorderWidth     =   2
      X1              =   0
      X2              =   6360
      Y1              =   2295
      Y2              =   2295
   End
End
Attribute VB_Name = "Dialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Option Explicit
Private Declare Function BitBlt Lib "gdi32" _
    (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, _
    ByVal nWidth As Long, ByVal nHeight As Long, _
    ByVal hSrcDC As Long, ByVal xSrc As Long, _
    ByVal ySrc As Long, ByVal dwRop As Long) As Long


Private Sub Form_Load()
    Dim str As String
    str = "Code by Jefri b Mustapa [sukiminna@gmail.com]" & vbCr & vbCr _
          & "Universiti Teknologi Malaysia (2008)" & vbCr & vbCrLf & "This is part of my final year project for algorithm test and generate barcode sample for my embedded camera based barcode reader (using FPGA)"
    Label1.Caption = str
    Label2.Caption = "IMAGE PROGRAMMING 4 FUN"
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Form1.Enabled = True
    'Gray.SetFocus

End Sub

Private Sub OKButton_Click()
    Unload Me
End Sub


Private Sub Timer1_Timer()
    Dim x As Long
    DoEvents
    Randomize
    Picture2.Cls
    x = Rnd * 20
    'Debug.Print x
    BitBlt Picture2.hdc, 7, 5, 8 * 10, 60, Picture1.hdc, x * 8, Picture1.ScaleHeight \ 2, vbSrcAnd
    Picture2.Refresh

End Sub

⌨️ 快捷键说明

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