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

📄 bar25.frm

📁 实用条码转换系统下载
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form25 
   Caption         =   "二五码"
   ClientHeight    =   4500
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5310
   LinkTopic       =   "Form1"
   Picture         =   "bar25.frx":0000
   ScaleHeight     =   4500
   ScaleWidth      =   5310
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command3 
      Caption         =   "退  出"
      Height          =   375
      Left            =   3600
      TabIndex        =   3
      Top             =   2880
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取  消"
      Height          =   375
      Left            =   2160
      TabIndex        =   2
      Top             =   2880
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确   定"
      Height          =   375
      Left            =   360
      TabIndex        =   1
      Top             =   2880
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2280
      TabIndex        =   0
      Top             =   2160
      Width           =   2415
   End
   Begin VB.PictureBox Picture1 
      BackColor       =   &H80000005&
      Height          =   1455
      Left            =   360
      ScaleHeight     =   1395
      ScaleWidth      =   4275
      TabIndex        =   4
      Top             =   360
      Width           =   4335
   End
   Begin VB.Label Label1 
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      Caption         =   "请输入编码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   600
      TabIndex        =   5
      Top             =   2280
      Width           =   1575
   End
End
Attribute VB_Name = "Form25"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a25(0 To 9, 1 To 5) As Integer

Private Sub Command1_Click()
Dim l, w, n, i, j, b As Integer
Dim a As String

l = Len(Text1.Text)
w = 150
n = 50

Picture1.Width = (2 * w + 8 * n) * l + (4 * w + 6 * n) + 100
If Form25.Width < Picture1.Width Then
   Form25.Width = Picture1.Width + 100
End If
Form25.Refresh
Picture1.Left = (Form25.Width - Picture1.Width) / 2
CurrentX = 0

Picture1.FillStyle = 0

Picture1.FillColor = RGB(0, 0, 0)
Picture1.Line (CurrentX, 0)-(CurrentX + w, Picture1.Height), , B
CurrentX = CurrentX + w

Picture1.FillColor = RGB(255, 255, 255)
Picture1.Line (CurrentX, 0)-(CurrentX + n, Picture1.Height), , B
CurrentX = CurrentX + n
     
Picture1.FillColor = RGB(0, 0, 0)
Picture1.Line (CurrentX, 0)-(CurrentX + w, Picture1.Height), , B
CurrentX = CurrentX + w

Picture1.FillColor = RGB(255, 255, 255)
Picture1.Line (CurrentX, 0)-(CurrentX + n, Picture1.Height), , B
CurrentX = CurrentX + n
     
Picture1.FillColor = RGB(0, 0, 0)
Picture1.Line (CurrentX, 0)-(CurrentX + n, Picture1.Height), , B
CurrentX = CurrentX + n

Picture1.FillColor = RGB(255, 255, 255)
Picture1.Line (CurrentX, 0)-(CurrentX + n, Picture1.Height), , B
CurrentX = CurrentX + n

For i = 1 To l
  a = Mid(Text1.Text, i, 1)
  b = Val(a)
  
  For j = 1 To 5
   If a25(b, j) = 0 Then
     Picture1.FillColor = RGB(0, 0, 0)
     Picture1.Line (CurrentX, 0)-(CurrentX + n, Picture1.Height), , B
     CurrentX = CurrentX + n
   Else
     Picture1.FillColor = RGB(0, 0, 0)
     Picture1.Line (CurrentX, 0)-(CurrentX + w, Picture1.Height), , B
     CurrentX = CurrentX + w
   End If
     Picture1.FillColor = RGB(255, 255, 255)
     Picture1.Line (CurrentX, 0)-(CurrentX + n, Picture1.Height), , B
     CurrentX = CurrentX + n
     
  Next j
Next i

Form25.Refresh
Picture1.FillColor = RGB(0, 0, 0)
Picture1.Line (CurrentX, 0)-(CurrentX + w, Picture1.Height), , B
CurrentX = CurrentX + w

Picture1.FillColor = RGB(255, 255, 255)
Picture1.Line (CurrentX, 0)-(CurrentX + n, Picture1.Height), , B
CurrentX = CurrentX + n
     
Picture1.FillColor = RGB(0, 0, 0)
Picture1.Line (CurrentX, 0)-(CurrentX + n, Picture1.Height), , B
CurrentX = CurrentX + n

Picture1.FillColor = RGB(255, 255, 255)
Picture1.Line (CurrentX, 0)-(CurrentX + n, Picture1.Height), , B
CurrentX = CurrentX + n
     
Picture1.FillColor = RGB(0, 0, 0)
Picture1.Line (CurrentX, 0)-(CurrentX + w, Picture1.Height), , B
CurrentX = CurrentX + w
End Sub

Private Sub Command2_Click()
Form25.Width = 5000
Picture1.Width = 4000
Picture1.Left = 500

Text1.Text = ""
Picture1.Cls
Text1.SetFocus
End Sub

Private Sub Command3_Click()
Unload Form25
system.Show
End Sub


Private Sub Form_Load()
a25(0, 1) = 0: a25(0, 2) = 0: a25(0, 3) = 1: a25(0, 4) = 1: a25(0, 5) = 0
a25(1, 1) = 1: a25(1, 2) = 0: a25(1, 3) = 0: a25(1, 4) = 0: a25(1, 5) = 1
a25(2, 1) = 0: a25(2, 2) = 1: a25(2, 3) = 0: a25(2, 4) = 0: a25(2, 5) = 1
a25(3, 1) = 1: a25(3, 2) = 1: a25(3, 3) = 0: a25(3, 4) = 0: a25(3, 5) = 0
a25(4, 1) = 0: a25(4, 2) = 0: a25(4, 3) = 1: a25(4, 4) = 0: a25(4, 5) = 1
a25(5, 1) = 1: a25(5, 2) = 0: a25(5, 3) = 1: a25(5, 4) = 0: a25(5, 5) = 0
a25(6, 1) = 0: a25(6, 2) = 1: a25(6, 3) = 1: a25(6, 4) = 0: a25(6, 5) = 0
a25(7, 1) = 0: a25(7, 2) = 0: a25(7, 3) = 0: a25(7, 4) = 1: a25(7, 5) = 1
a25(8, 1) = 1: a25(8, 2) = 0: a25(8, 3) = 0: a25(8, 4) = 1: a25(8, 5) = 0
a25(9, 1) = 0: a25(9, 2) = 1: a25(9, 3) = 0: a25(9, 4) = 1: a25(9, 5) = 0

Text1.Text = ""
Label1.FontSize = 12
Label1.FontBold = True
Label1.FontItalic = True

Form25.Width = 5000
Picture1.Width = 4000
Picture1.Left = 500

End Sub



Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode >= &H31 And KeyCode <= &H39 Or KeyCode >= &H61 And KeyCode <= &H69 Then
   a = 1
Else
   a = 0

End If



End Sub

⌨️ 快捷键说明

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