home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 5
/
ctrom5b.zip
/
ctrom5b
/
PROGRAM
/
VISBASIC
/
BARCODE
/
SAMPLE.ZIP
/
BSAMPLE2.FRM
< prev
next >
Wrap
Text File
|
1995-01-05
|
10KB
|
353 lines
VERSION 2.00
Begin Form bsample2
BorderStyle = 3 'Fixed Double
Caption = "BarCod Sample #2"
ClientHeight = 4455
ClientLeft = 1470
ClientTop = 2445
ClientWidth = 5295
Height = 4860
Left = 1410
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4455
ScaleWidth = 5295
Top = 2100
Width = 5415
Begin Barcode Barcode1
BarWidth = 8
Direction = 0 'Left to Right
Height = 495
Left = 240
Style = 3 '3 of 9
Top = 4560
Width = 4815
End
Begin TextBox Text1
Height = 285
Index = 14
Left = 3840
TabIndex = 30
Top = 3120
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 13
Left = 3840
TabIndex = 28
Top = 2760
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 12
Left = 3840
TabIndex = 26
Top = 2400
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 11
Left = 3840
TabIndex = 24
Top = 2040
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 10
Left = 3840
TabIndex = 22
Top = 1680
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 9
Left = 3840
TabIndex = 20
Top = 1320
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 8
Left = 1320
TabIndex = 18
Top = 3120
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 7
Left = 1320
TabIndex = 16
Top = 2760
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 6
Left = 1320
TabIndex = 14
Top = 2400
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 5
Left = 1320
TabIndex = 12
Top = 2040
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 4
Left = 1320
TabIndex = 10
Top = 1680
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 3
Left = 1320
TabIndex = 8
Top = 1320
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 2
Left = 1320
TabIndex = 6
Top = 960
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 1
Left = 1320
TabIndex = 4
Top = 600
Width = 1215
End
Begin TextBox Text1
Height = 285
Index = 0
Left = 1320
TabIndex = 2
Top = 240
Width = 1215
End
Begin CommandButton Command2
Caption = "Print Barcode Sample"
Height = 375
Left = 2760
TabIndex = 1
Top = 720
Width = 2295
End
Begin CommandButton Command1
Caption = "Exit Sample"
Height = 375
Left = 2760
TabIndex = 0
Top = 240
Width = 2295
End
Begin Label Label2
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."
Height = 615
Left = 240
TabIndex = 32
Top = 3600
Width = 4815
End
Begin Label Label1
Caption = "Barcode 15"
Height = 255
Index = 14
Left = 2760
TabIndex = 31
Top = 3180
Width = 1095
End
Begin Label Label1
Caption = "Barcode 14"
Height = 255
Index = 13
Left = 2760
TabIndex = 29
Top = 2820
Width = 1095
End
Begin Label Label1
Caption = "Barcode 13"
Height = 255
Index = 12
Left = 2760
TabIndex = 27
Top = 2460
Width = 1095
End
Begin Label Label1
Caption = "Barcode 12"
Height = 255
Index = 11
Left = 2760
TabIndex = 25
Top = 2100
Width = 1095
End
Begin Label Label1
Caption = "Barcode 11"
Height = 255
Index = 10
Left = 2760
TabIndex = 23
Top = 1740
Width = 1095
End
Begin Label Label1
Caption = "Barcode 10"
Height = 255
Index = 9
Left = 2760
TabIndex = 21
Top = 1380
Width = 1095
End
Begin Label Label1
Caption = "Barcode 9"
Height = 255
Index = 8
Left = 240
TabIndex = 19
Top = 3180
Width = 1095
End
Begin Label Label1
Caption = "Barcode 8"
Height = 255
Index = 7
Left = 240
TabIndex = 17
Top = 2820
Width = 1095
End
Begin Label Label1
Caption = "Barcode 7"
Height = 255
Index = 6
Left = 240
TabIndex = 15
Top = 2460
Width = 1095
End
Begin Label Label1
Caption = "Barcode 6"
Height = 255
Index = 5
Left = 240
TabIndex = 13
Top = 2100
Width = 1095
End
Begin Label Label1
Caption = "Barcode 5"
Height = 255
Index = 4
Left = 240
TabIndex = 11
Top = 1740
Width = 1095
End
Begin Label Label1
Caption = "Barcode 4"
Height = 255
Index = 3
Left = 240
TabIndex = 9
Top = 1380
Width = 1095
End
Begin Label Label1
Caption = "Barcode 3"
Height = 255
Index = 2
Left = 240
TabIndex = 7
Top = 990
Width = 1095
End
Begin Label Label1
Caption = "Barcode 2"
Height = 255
Index = 1
Left = 240
TabIndex = 5
Top = 660
Width = 1095
End
Begin Label Label1
Caption = "Barcode 1"
Height = 255
Index = 0
Left = 240
TabIndex = 3
Top = 300
Width = 1095
End
End
Option Explicit
Sub Command1_Click ()
End
End Sub
Sub Command2_Click ()
Dim I As Integer
Screen.MousePointer = 11
Printer.ScaleMode = 1
Barcode1.PrinterScaleMode = Printer.ScaleMode
For I = 0 To 14
Barcode1.Caption = Text1(I).Text
Barcode1.PrinterLeft = 1440 + (3.25 * 1440) * Int(I / 8)
Barcode1.PrinterTop = 1440 + 1440 * (I Mod 8)
Barcode1.PrinterWidth = 3 * 1440
Barcode1.PrinterHeight = 720
Barcode1.PrinterHDC = Printer.hDC
Printer.CurrentX = Barcode1.PrinterLeft
Printer.CurrentY = Barcode1.PrinterTop + Barcode1.PrinterHeight + 180
Printer.Print Barcode1.Displayed
Next I
Printer.EndDoc
Screen.MousePointer = 0
End Sub
Sub Form_Load ()
Dim I As Integer
BSample2.Left = (Screen.Width - BSample2.Width) / 2
BSample2.Top = (Screen.Height - BSample2.Height) / 2
For I = 0 To 14
Text1(I).Text = Chr$(I + 65) + Format$(I)
Next I
End Sub
Sub Form_Unload (Cancel As Integer)
End
End Sub