home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "Barcode Generator"
- ClientHeight = 3885
- ClientLeft = 2715
- ClientTop = 1395
- ClientWidth = 4995
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Icon = "Form1.frx":0000
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 3885
- ScaleWidth = 4995
- Begin VB.CommandButton cmdPrint
- Caption = "Print"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = 2880
- TabIndex = 8
- Top = 3000
- Width = 975
- End
- Begin VB.OptionButton optSize
- Caption = "Large"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 192
- Index = 2
- Left = 240
- TabIndex = 7
- Top = 3360
- Width = 972
- End
- Begin VB.OptionButton optSize
- Caption = "Medium"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 192
- Index = 1
- Left = 240
- TabIndex = 6
- Top = 3120
- Width = 972
- End
- Begin VB.OptionButton optSize
- Caption = "Small"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 192
- Index = 0
- Left = 240
- TabIndex = 5
- Top = 2880
- Width = 972
- End
- Begin VB.CommandButton cmdExit
- Caption = "E&xit"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 612
- Left = 1680
- TabIndex = 2
- Top = 3000
- Width = 975
- End
- Begin VB.TextBox Text1
- BeginProperty Font
- Name = "Courier New"
- Size = 16.5
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 492
- Left = 120
- TabIndex = 1
- Text = "12345678"
- Top = 360
- Width = 3732
- End
- Begin VB.PictureBox Picture1
- Appearance = 0 'Flat
- AutoRedraw = -1 'True
- BackColor = &H00FFFFFF&
- FillStyle = 0 'Solid
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 1212
- Left = 120
- ScaleHeight = 1185
- ScaleWidth = 3825
- TabIndex = 0
- Top = 1320
- Width = 3852
- End
- Begin VB.Label Label2
- Caption = "This barcode is copied to clipboard"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 252
- Left = 120
- TabIndex = 4
- Top = 1080
- Width = 3612
- End
- Begin VB.Label Label1
- Caption = "Enter text for barcode"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 252
- Left = 120
- TabIndex = 3
- Top = 120
- Width = 3612
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdExit_Click()
- End
- End Sub
- Private Sub cmdPrint_Click()
- Printer.PaintPicture Picture1, 5000, 5000
- Printer.EndDoc
- End Sub
- Private Sub Form_Activate()
- optSize(1) = 1
- End Sub
- Private Sub optSize_Click(Index As Integer)
- Picture1.ScaleMode = 3
- Select Case Index
- Case 0
- Picture1.Height = Picture1.Height * (1.4 * 40 / Picture1.ScaleHeight)
- Picture1.FontSize = 8
- Case 1
- Picture1.Height = Picture1.Height * (2.4 * 40 / Picture1.ScaleHeight)
- Picture1.FontSize = 10
- Case 2
- Picture1.Height = Picture1.Height * (3 * 40 / Picture1.ScaleHeight)
- Picture1.FontSize = 14
- End Select
- Call Text1_Change
- End Sub
- Private Sub Text1_Change()
- Call DrawBarcode(Text1, Picture1)
- MinWidth = 2 * Text1.Left + Text1.Width
- pw = 2 * Picture1.Left + Picture1.Width
- fw = MinWidth
- If pw > fw Then fw = pw
- Form1.Width = fw
- End Sub
-