BarCode Printing

Anything related to Barcode ActiveX programming

BarCode Printing

Postby atifmushtaq(legacy member) on Sat Mar 29, 2008 9:21 pm

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
atifmushtaq(legacy member)
 

Re: BarCode Printing

Postby glitch (legacy member) on Mon Mar 31, 2008 10:27 am

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
glitch (legacy member)
 

Re: BarCode Printing

Postby atifmushtaq(legacy member) on Mon Mar 31, 2008 1:46 pm

Thank you but I Enter this code & when I order to print it say Variable not defiend

Please help me
atifmushtaq(legacy member)
 

Re: BarCode Printing

Postby glitch (legacy member) on Mon Mar 31, 2008 3:27 pm

Find out which variable is undefined.
glitch (legacy member)
 

Re: BarCode Printing

Postby atifmushtaq(legacy member) on Tue Apr 01, 2008 10:18 pm

" XMargin = "
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

Postby glitch (legacy member) on Wed Apr 02, 2008 10:54 am

You can remove them, or define them as

Dim XMargin As Integer
glitch (legacy member)
 

Re: BarCode Printing

Postby atifmushtaq(legacy member) on Thu Apr 03, 2008 10:00 pm

Thank you now it will ok
atifmushtaq(legacy member)
 


Return to Barcode ActiveX Control

Who is online

Users browsing this forum: No registered users and 2 guests