home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1999 April / CD_Shareware_Magazine_31.iso / Free / Prg / BarCode.exe / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-03-18  |  7.0 KB  |  223 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Barcode Generator"
  4.    ClientHeight    =   3885
  5.    ClientLeft      =   2715
  6.    ClientTop       =   1395
  7.    ClientWidth     =   4995
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    ForeColor       =   &H00C00000&
  18.    Icon            =   "Form1.frx":0000
  19.    LinkTopic       =   "Form1"
  20.    PaletteMode     =   1  'UseZOrder
  21.    ScaleHeight     =   3885
  22.    ScaleWidth      =   4995
  23.    Begin VB.CommandButton cmdPrint 
  24.       Caption         =   "Print"
  25.       BeginProperty Font 
  26.          Name            =   "MS Sans Serif"
  27.          Size            =   8.25
  28.          Charset         =   0
  29.          Weight          =   400
  30.          Underline       =   0   'False
  31.          Italic          =   0   'False
  32.          Strikethrough   =   0   'False
  33.       EndProperty
  34.       Height          =   615
  35.       Left            =   2880
  36.       TabIndex        =   8
  37.       Top             =   3000
  38.       Width           =   975
  39.    End
  40.    Begin VB.OptionButton optSize 
  41.       Caption         =   "Large"
  42.       BeginProperty Font 
  43.          Name            =   "MS Sans Serif"
  44.          Size            =   8.25
  45.          Charset         =   0
  46.          Weight          =   400
  47.          Underline       =   0   'False
  48.          Italic          =   0   'False
  49.          Strikethrough   =   0   'False
  50.       EndProperty
  51.       Height          =   192
  52.       Index           =   2
  53.       Left            =   240
  54.       TabIndex        =   7
  55.       Top             =   3360
  56.       Width           =   972
  57.    End
  58.    Begin VB.OptionButton optSize 
  59.       Caption         =   "Medium"
  60.       BeginProperty Font 
  61.          Name            =   "MS Sans Serif"
  62.          Size            =   8.25
  63.          Charset         =   0
  64.          Weight          =   400
  65.          Underline       =   0   'False
  66.          Italic          =   0   'False
  67.          Strikethrough   =   0   'False
  68.       EndProperty
  69.       Height          =   192
  70.       Index           =   1
  71.       Left            =   240
  72.       TabIndex        =   6
  73.       Top             =   3120
  74.       Width           =   972
  75.    End
  76.    Begin VB.OptionButton optSize 
  77.       Caption         =   "Small"
  78.       BeginProperty Font 
  79.          Name            =   "MS Sans Serif"
  80.          Size            =   8.25
  81.          Charset         =   0
  82.          Weight          =   400
  83.          Underline       =   0   'False
  84.          Italic          =   0   'False
  85.          Strikethrough   =   0   'False
  86.       EndProperty
  87.       Height          =   192
  88.       Index           =   0
  89.       Left            =   240
  90.       TabIndex        =   5
  91.       Top             =   2880
  92.       Width           =   972
  93.    End
  94.    Begin VB.CommandButton cmdExit 
  95.       Caption         =   "E&xit"
  96.       BeginProperty Font 
  97.          Name            =   "MS Sans Serif"
  98.          Size            =   8.25
  99.          Charset         =   0
  100.          Weight          =   400
  101.          Underline       =   0   'False
  102.          Italic          =   0   'False
  103.          Strikethrough   =   0   'False
  104.       EndProperty
  105.       Height          =   612
  106.       Left            =   1680
  107.       TabIndex        =   2
  108.       Top             =   3000
  109.       Width           =   975
  110.    End
  111.    Begin VB.TextBox Text1 
  112.       BeginProperty Font 
  113.          Name            =   "Courier New"
  114.          Size            =   16.5
  115.          Charset         =   0
  116.          Weight          =   700
  117.          Underline       =   0   'False
  118.          Italic          =   0   'False
  119.          Strikethrough   =   0   'False
  120.       EndProperty
  121.       Height          =   492
  122.       Left            =   120
  123.       TabIndex        =   1
  124.       Text            =   "12345678"
  125.       Top             =   360
  126.       Width           =   3732
  127.    End
  128.    Begin VB.PictureBox Picture1 
  129.       Appearance      =   0  'Flat
  130.       AutoRedraw      =   -1  'True
  131.       BackColor       =   &H00FFFFFF&
  132.       FillStyle       =   0  'Solid
  133.       BeginProperty Font 
  134.          Name            =   "MS Sans Serif"
  135.          Size            =   9.75
  136.          Charset         =   0
  137.          Weight          =   700
  138.          Underline       =   0   'False
  139.          Italic          =   0   'False
  140.          Strikethrough   =   0   'False
  141.       EndProperty
  142.       ForeColor       =   &H00000000&
  143.       Height          =   1212
  144.       Left            =   120
  145.       ScaleHeight     =   1185
  146.       ScaleWidth      =   3825
  147.       TabIndex        =   0
  148.       Top             =   1320
  149.       Width           =   3852
  150.    End
  151.    Begin VB.Label Label2 
  152.       Caption         =   "This barcode is copied to clipboard"
  153.       BeginProperty Font 
  154.          Name            =   "MS Sans Serif"
  155.          Size            =   8.25
  156.          Charset         =   0
  157.          Weight          =   400
  158.          Underline       =   0   'False
  159.          Italic          =   0   'False
  160.          Strikethrough   =   0   'False
  161.       EndProperty
  162.       Height          =   252
  163.       Left            =   120
  164.       TabIndex        =   4
  165.       Top             =   1080
  166.       Width           =   3612
  167.    End
  168.    Begin VB.Label Label1 
  169.       Caption         =   "Enter text for barcode"
  170.       BeginProperty Font 
  171.          Name            =   "MS Sans Serif"
  172.          Size            =   8.25
  173.          Charset         =   0
  174.          Weight          =   400
  175.          Underline       =   0   'False
  176.          Italic          =   0   'False
  177.          Strikethrough   =   0   'False
  178.       EndProperty
  179.       Height          =   252
  180.       Left            =   120
  181.       TabIndex        =   3
  182.       Top             =   120
  183.       Width           =   3612
  184.    End
  185. Attribute VB_Name = "Form1"
  186. Attribute VB_GlobalNameSpace = False
  187. Attribute VB_Creatable = False
  188. Attribute VB_PredeclaredId = True
  189. Attribute VB_Exposed = False
  190. Private Sub cmdExit_Click()
  191.     End
  192. End Sub
  193. Private Sub cmdPrint_Click()
  194.     Printer.PaintPicture Picture1, 5000, 5000
  195.     Printer.EndDoc
  196. End Sub
  197. Private Sub Form_Activate()
  198.     optSize(1) = 1
  199. End Sub
  200. Private Sub optSize_Click(Index As Integer)
  201.     Picture1.ScaleMode = 3
  202.     Select Case Index
  203.     Case 0
  204.         Picture1.Height = Picture1.Height * (1.4 * 40 / Picture1.ScaleHeight)
  205.         Picture1.FontSize = 8
  206.     Case 1
  207.         Picture1.Height = Picture1.Height * (2.4 * 40 / Picture1.ScaleHeight)
  208.         Picture1.FontSize = 10
  209.     Case 2
  210.         Picture1.Height = Picture1.Height * (3 * 40 / Picture1.ScaleHeight)
  211.         Picture1.FontSize = 14
  212.     End Select
  213.     Call Text1_Change
  214. End Sub
  215. Private Sub Text1_Change()
  216.     Call DrawBarcode(Text1, Picture1)
  217.     MinWidth = 2 * Text1.Left + Text1.Width
  218.     pw = 2 * Picture1.Left + Picture1.Width
  219.     fw = MinWidth
  220.     If pw > fw Then fw = pw
  221.     Form1.Width = fw
  222. End Sub
  223.