BarCode Printing
7 posts • Page 1 of 1
BarCode Printing
Sir,
I have use barcode in my application please tell me that how can I print this and also tell me that is it possible that the Printing of barcode in Datareport in Visual Basic 6
Thanks
I have use barcode in my application please tell me that how can I print this and also tell me that is it possible that the Printing of barcode in Datareport in Visual Basic 6
Thanks
- atifmushtaq(legacy member)
Re: BarCode Printing
You can find the print code in the VB6 sample project. See code below:
Printer.ScaleMode = vbTwips ' set the printer scalemode to Twips
'Coordinates for PaintPicture method must now be in Twips.
'1 inch has 1440 Twips.
XMargin = (Printer.Width - Printer.ScaleWidth) / 2
YMargin = (Printer.Height - Printer.ScaleHeight) / 2
X = 1 * 1440 ' X position in 1 Inch
Y = 1 * 1440 ' Y position in 1 Inch
X = X - XMargin ' adjust for margins
Y = Y - YMargin ' adjust for margins
'Print the barcode directly to the printer, start at position X,Y
Printer.Print "Morovia Bar Code Activex Sample"
Printer.Print "Printing the barcode at X= 1 Inch, Y= 1 Inch"
Printer.PaintPicture MrvBarcode1.Picture, X, Y
'Eject the page...
Printer.EndDoc
Printer.ScaleMode = vbTwips ' set the printer scalemode to Twips
'Coordinates for PaintPicture method must now be in Twips.
'1 inch has 1440 Twips.
XMargin = (Printer.Width - Printer.ScaleWidth) / 2
YMargin = (Printer.Height - Printer.ScaleHeight) / 2
X = 1 * 1440 ' X position in 1 Inch
Y = 1 * 1440 ' Y position in 1 Inch
X = X - XMargin ' adjust for margins
Y = Y - YMargin ' adjust for margins
'Print the barcode directly to the printer, start at position X,Y
Printer.Print "Morovia Bar Code Activex Sample"
Printer.Print "Printing the barcode at X= 1 Inch, Y= 1 Inch"
Printer.PaintPicture MrvBarcode1.Picture, X, Y
'Eject the page...
Printer.EndDoc
- glitch (legacy member)
Re: BarCode Printing
Thank you but I Enter this code & when I order to print it say Variable not defiend
Please help me
Please help me
- atifmushtaq(legacy member)
Re: BarCode Printing
" XMargin = "
Sir,
Please tell me where i put this code , in button or................
Please help me as soon as possible
Sir,
Please tell me where i put this code , in button or................
Please help me as soon as possible
- atifmushtaq(legacy member)
Re: BarCode Printing
You can remove them, or define them as
Dim XMargin As Integer
Dim XMargin As Integer
- glitch (legacy member)
7 posts • Page 1 of 1
Return to Barcode ActiveX Control
Who is online
Users browsing this forum: No registered users and 0 guests