home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / msmega.zip / BARCODSA.ZIP / BSAMPLE2.FRM < prev    next >
Text File  |  1995-05-16  |  10KB  |  355 lines

  1. VERSION 2.00
  2. Begin Form bsample2 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "BarCod Sample #2"
  5.    ClientHeight    =   4455
  6.    ClientLeft      =   1470
  7.    ClientTop       =   2445
  8.    ClientWidth     =   5295
  9.    Height          =   4860
  10.    Left            =   1410
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   4455
  14.    ScaleWidth      =   5295
  15.    Top             =   2100
  16.    Width           =   5415
  17.    Begin Barcode Barcode1 
  18.       BarWidth        =   8
  19.       Direction       =   0  'Left to Right
  20.       Height          =   495
  21.       Left            =   240
  22.       Style           =   3  '3 of 9
  23.       Top             =   4560
  24.       UPCNotches      =   3  'Both
  25.       Width           =   4815
  26.    End
  27.    Begin TextBox Text1 
  28.       Height          =   285
  29.       Index           =   14
  30.       Left            =   3840
  31.       TabIndex        =   30
  32.       Top             =   3120
  33.       Width           =   1215
  34.    End
  35.    Begin TextBox Text1 
  36.       Height          =   285
  37.       Index           =   13
  38.       Left            =   3840
  39.       TabIndex        =   28
  40.       Top             =   2760
  41.       Width           =   1215
  42.    End
  43.    Begin TextBox Text1 
  44.       Height          =   285
  45.       Index           =   12
  46.       Left            =   3840
  47.       TabIndex        =   26
  48.       Top             =   2400
  49.       Width           =   1215
  50.    End
  51.    Begin TextBox Text1 
  52.       Height          =   285
  53.       Index           =   11
  54.       Left            =   3840
  55.       TabIndex        =   24
  56.       Top             =   2040
  57.       Width           =   1215
  58.    End
  59.    Begin TextBox Text1 
  60.       Height          =   285
  61.       Index           =   10
  62.       Left            =   3840
  63.       TabIndex        =   22
  64.       Top             =   1680
  65.       Width           =   1215
  66.    End
  67.    Begin TextBox Text1 
  68.       Height          =   285
  69.       Index           =   9
  70.       Left            =   3840
  71.       TabIndex        =   20
  72.       Top             =   1320
  73.       Width           =   1215
  74.    End
  75.    Begin TextBox Text1 
  76.       Height          =   285
  77.       Index           =   8
  78.       Left            =   1320
  79.       TabIndex        =   18
  80.       Top             =   3120
  81.       Width           =   1215
  82.    End
  83.    Begin TextBox Text1 
  84.       Height          =   285
  85.       Index           =   7
  86.       Left            =   1320
  87.       TabIndex        =   16
  88.       Top             =   2760
  89.       Width           =   1215
  90.    End
  91.    Begin TextBox Text1 
  92.       Height          =   285
  93.       Index           =   6
  94.       Left            =   1320
  95.       TabIndex        =   14
  96.       Top             =   2400
  97.       Width           =   1215
  98.    End
  99.    Begin TextBox Text1 
  100.       Height          =   285
  101.       Index           =   5
  102.       Left            =   1320
  103.       TabIndex        =   12
  104.       Top             =   2040
  105.       Width           =   1215
  106.    End
  107.    Begin TextBox Text1 
  108.       Height          =   285
  109.       Index           =   4
  110.       Left            =   1320
  111.       TabIndex        =   10
  112.       Top             =   1680
  113.       Width           =   1215
  114.    End
  115.    Begin TextBox Text1 
  116.       Height          =   285
  117.       Index           =   3
  118.       Left            =   1320
  119.       TabIndex        =   8
  120.       Top             =   1320
  121.       Width           =   1215
  122.    End
  123.    Begin TextBox Text1 
  124.       Height          =   285
  125.       Index           =   2
  126.       Left            =   1320
  127.       TabIndex        =   6
  128.       Top             =   960
  129.       Width           =   1215
  130.    End
  131.    Begin TextBox Text1 
  132.       Height          =   285
  133.       Index           =   1
  134.       Left            =   1320
  135.       TabIndex        =   4
  136.       Top             =   600
  137.       Width           =   1215
  138.    End
  139.    Begin TextBox Text1 
  140.       Height          =   285
  141.       Index           =   0
  142.       Left            =   1320
  143.       TabIndex        =   2
  144.       Top             =   240
  145.       Width           =   1215
  146.    End
  147.    Begin CommandButton Command2 
  148.       Caption         =   "Print Barcode Sample"
  149.       Height          =   375
  150.       Left            =   2760
  151.       TabIndex        =   1
  152.       Top             =   720
  153.       Width           =   2295
  154.    End
  155.    Begin CommandButton Command1 
  156.       Caption         =   "Exit Sample"
  157.       Height          =   375
  158.       Left            =   2760
  159.       TabIndex        =   0
  160.       Top             =   240
  161.       Width           =   2295
  162.    End
  163.    Begin Label Label2 
  164.       Caption         =   "The barcode control is below the edge of the window.  Since it is only used to print the barcode, it isn't necessary for the user to see it."
  165.       Height          =   615
  166.       Left            =   240
  167.       TabIndex        =   32
  168.       Top             =   3600
  169.       Width           =   4815
  170.    End
  171.    Begin Label Label1 
  172.       Caption         =   "Barcode 15"
  173.       Height          =   255
  174.       Index           =   14
  175.       Left            =   2760
  176.       TabIndex        =   31
  177.       Top             =   3180
  178.       Width           =   1095
  179.    End
  180.    Begin Label Label1 
  181.       Caption         =   "Barcode 14"
  182.       Height          =   255
  183.       Index           =   13
  184.       Left            =   2760
  185.       TabIndex        =   29
  186.       Top             =   2820
  187.       Width           =   1095
  188.    End
  189.    Begin Label Label1 
  190.       Caption         =   "Barcode 13"
  191.       Height          =   255
  192.       Index           =   12
  193.       Left            =   2760
  194.       TabIndex        =   27
  195.       Top             =   2460
  196.       Width           =   1095
  197.    End
  198.    Begin Label Label1 
  199.       Caption         =   "Barcode 12"
  200.       Height          =   255
  201.       Index           =   11
  202.       Left            =   2760
  203.       TabIndex        =   25
  204.       Top             =   2100
  205.       Width           =   1095
  206.    End
  207.    Begin Label Label1 
  208.       Caption         =   "Barcode 11"
  209.       Height          =   255
  210.       Index           =   10
  211.       Left            =   2760
  212.       TabIndex        =   23
  213.       Top             =   1740
  214.       Width           =   1095
  215.    End
  216.    Begin Label Label1 
  217.       Caption         =   "Barcode 10"
  218.       Height          =   255
  219.       Index           =   9
  220.       Left            =   2760
  221.       TabIndex        =   21
  222.       Top             =   1380
  223.       Width           =   1095
  224.    End
  225.    Begin Label Label1 
  226.       Caption         =   "Barcode 9"
  227.       Height          =   255
  228.       Index           =   8
  229.       Left            =   240
  230.       TabIndex        =   19
  231.       Top             =   3180
  232.       Width           =   1095
  233.    End
  234.    Begin Label Label1 
  235.       Caption         =   "Barcode 8"
  236.       Height          =   255
  237.       Index           =   7
  238.       Left            =   240
  239.       TabIndex        =   17
  240.       Top             =   2820
  241.       Width           =   1095
  242.    End
  243.    Begin Label Label1 
  244.       Caption         =   "Barcode 7"
  245.       Height          =   255
  246.       Index           =   6
  247.       Left            =   240
  248.       TabIndex        =   15
  249.       Top             =   2460
  250.       Width           =   1095
  251.    End
  252.    Begin Label Label1 
  253.       Caption         =   "Barcode 6"
  254.       Height          =   255
  255.       Index           =   5
  256.       Left            =   240
  257.       TabIndex        =   13
  258.       Top             =   2100
  259.       Width           =   1095
  260.    End
  261.    Begin Label Label1 
  262.       Caption         =   "Barcode 5"
  263.       Height          =   255
  264.       Index           =   4
  265.       Left            =   240
  266.       TabIndex        =   11
  267.       Top             =   1740
  268.       Width           =   1095
  269.    End
  270.    Begin Label Label1 
  271.       Caption         =   "Barcode 4"
  272.       Height          =   255
  273.       Index           =   3
  274.       Left            =   240
  275.       TabIndex        =   9
  276.       Top             =   1380
  277.       Width           =   1095
  278.    End
  279.    Begin Label Label1 
  280.       Caption         =   "Barcode 3"
  281.       Height          =   255
  282.       Index           =   2
  283.       Left            =   240
  284.       TabIndex        =   7
  285.       Top             =   990
  286.       Width           =   1095
  287.    End
  288.    Begin Label Label1 
  289.       Caption         =   "Barcode 2"
  290.       Height          =   255
  291.       Index           =   1
  292.       Left            =   240
  293.       TabIndex        =   5
  294.       Top             =   660
  295.       Width           =   1095
  296.    End
  297.    Begin Label Label1 
  298.       Caption         =   "Barcode 1"
  299.       Height          =   255
  300.       Index           =   0
  301.       Left            =   240
  302.       TabIndex        =   3
  303.       Top             =   300
  304.       Width           =   1095
  305.    End
  306. End
  307. Option Explicit
  308.  
  309. Sub Command1_Click ()
  310.     End
  311. End Sub
  312.  
  313. Sub Command2_Click ()
  314.     Dim I As Integer
  315.  
  316.     Screen.MousePointer = 11
  317.  
  318.     Printer.Print
  319.     Printer.ScaleMode = 1
  320.     Barcode1.PrinterScaleMode = Printer.ScaleMode
  321.  
  322.     For I = 0 To 14
  323.         Barcode1.Caption = Text1(I).Text
  324.         Barcode1.PrinterLeft = 1440 + (3.25 * 1440) * Int(I / 8)
  325.         Barcode1.PrinterTop = 1440 + 1440 * (I Mod 8)
  326.         Barcode1.PrinterWidth = 3 * 1440
  327.         Barcode1.PrinterHeight = 720
  328.         Barcode1.PrinterHDC = Printer.hDC
  329.  
  330.         Printer.CurrentX = Barcode1.PrinterLeft
  331.         Printer.CurrentY = Barcode1.PrinterTop + Barcode1.PrinterHeight + 180
  332.         Printer.Print Barcode1.Displayed
  333.     Next I
  334.  
  335.     Printer.EndDoc
  336.  
  337.     Screen.MousePointer = 0
  338. End Sub
  339.  
  340. Sub Form_Load ()
  341.     Dim I As Integer
  342.  
  343.     BSample2.Left = (Screen.Width - BSample2.Width) / 2
  344.     BSample2.Top = (Screen.Height - BSample2.Height) / 2
  345.  
  346.     For I = 0 To 14
  347.         Text1(I).Text = Chr$(I + 65) + Format$(I)
  348.     Next I
  349. End Sub
  350.  
  351. Sub Form_Unload (Cancel As Integer)
  352.     End
  353. End Sub
  354.  
  355.