Print Preview ActiveX Active Users: 91 / Visits Today: 116
Highest Active Users: 91
Print Preview ActiveX
Home | Profile | Register | Active Topics | Members | Search | FAQ | RSS
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Print Preview
 Questions about Print Preview
 UCC/EAN 128 Barcode Code
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic: Collections of Arrays in VB.NET Topic Next Topic: RichTextBox  

ebirming
Starting Member

USA
14 Posts

Posted - 05/12/2004 :  07:42:51  Show Profile  Reply with Quote
Waty,

I've developed the code to generate UPC/EAN 128 bar codes in VB. If I gave you the code could you write it in to Print Preview?

My problem is I generate it in a PictureBox and then use the DrawPictureMemory to show it on the preview. Looks great on the Preview and prints just fine. However, when I export it to .PDF, all I get is a black box.

Examples:

http://tlmaxcap.com/BOLDownload/BOLPreviewScreenGrab.JPG

http://tlmaxcap.com/BOLDownload/BOLPreviewBlackBox.pdf

Thanks,
Eddie B.
Go to Bottom of Page

Waty Thierry
Forum Admin

Belgium
635 Posts

Posted - 06/25/2004 :  09:45:10  Show Profile  Visit Waty Thierry's Homepage  Reply with Quote
Could you send me your code that generate the output on the screen?
I will check and fix the PDF output.

Come and visit :
www.immoassist.com
www.ppreview.net
www.vbdiamond.com
www.d2dsources.com
www.mandix.com
Go to Bottom of PageGo to Top of Page

ebirming
Starting Member

USA
14 Posts

Posted - 07/27/2004 :  06:37:40  Show Profile  Reply with Quote
Waty,

I generate the bar code by drawing lines on a PictureBox. Here is the code (BOLBinary is a string of 0's and 1's):

    If Me.FormType = formVICSLaserQuality Then
        DLLBarCodeForm.bcBOLNum.DrawWidth = 1
        BarSpacing = 15
      Else                              '***** 2X WIDE FOR DOT MATRIX
        DLLBarCodeForm.bcBOLNum.DrawWidth = 2
        BarSpacing = 30
    End If
    
    For Dumb1 = 1 To Len(BOLBinary)
        tmpChar = Mid(BOLBinary, Dumb1, 1)

        If tmpChar = "0" Then
            BarColor = vbWhite
          Else
            BarColor = vbBlack
        End If

        DLLBarCodeForm.bcBOLNum.ForeColor = BarColor

        CurrentX = BarSpacing * Dumb1
        CurrentY = 0
        DLLBarCodeForm.bcBOLNum.Line (300 + CurrentX, CurrentY)-(300 + CurrentX, CurrentY2)
    Next Dumb1


Then, to print it to PrintPreview, I use the following code:


     Preview.DrawPictureMemory DLLBarCodeForm.bcBOLNum.Image, tempBOLNumLeft, topBOL + 300


I haven't tried NOT drawing the white lines... maybe this is the problem (I'll try it)? Let me know if you need more info. Thanks!
Eddie B.

Edited by - ebirming on 07/27/2004 06:40:02
Go to Bottom of PageGo to Top of Page

ebirming
Starting Member

USA
14 Posts

Posted - 07/27/2004 :  06:49:02  Show Profile  Reply with Quote
I tried not printing the white lines, but I still get the black box. FYI.

Eddie B.
Go to Bottom of PageGo to Top of Page

hongdi
Starting Member

2 Posts

Posted - 05/21/2013 :  06:31:30  Show Profile  Reply with Quote
I recommend you a link to free vb.net code to generate barcode images:

http://www.devasp.net/net/articles/display/742.html
http://www.barcodelib.com/vb_net/

Go to Bottom of PageGo to Top of Page

susanyy
Starting Member

4 Posts

Posted - 06/19/2013 :  04:48:25  Show Profile  Reply with Quote
Have you ever used this free VB barcode generator? It supports multiple barcode types including EAN-128, UPC-A, Code 39, QR Code etc.
Go to Bottom of PageGo to Top of Page

thyui
Starting Member

USA
3 Posts

Posted - 07/17/2013 :  05:30:14  Show Profile  Reply with Quote
i have several years#180; experience in generating barcode, i think some turioals and articles might be helpful. you can google EAN-128 barcode, and some articles can be available. i can give you some if you need .
this is the tutorial of generating EAN-128 barcode , you can ,make it as reference and the tool if free for 30 days. http://www.rasteredge.com/how-to/csharp-imaging/barcode-generating-gs1128/
this is the barcode generator in c# and other formats, i think it might also be helpful http://www.rasteredge.com/how-to/csharp-imaging/barcode-generating/

good luck!

Edited by - thyui on 07/17/2013 05:31:44
Go to Bottom of PageGo to Top of Page

makaveiljojo
Starting Member

USA
8 Posts

Posted - 12/13/2013 :  02:56:41  Show Profile  Reply with Quote
Check the following two tutorials that might be helpful:
How to generate UPC-A in VB.NET
How to generate EAN-128 in VB.NET


Edited by - makaveiljojo on 12/13/2013 02:58:16
Go to Bottom of PageGo to Top of Page

hongdi
Starting Member

2 Posts

Posted - 05/23/2014 :  10:19:32  Show Profile  Reply with Quote
I think this barcode creating post has been hijacked.


____________________________________________________________________
http://www.keepdynamic.com/barcoding/csharp-barcode-generator.shtml

Edited by - hongdi on 05/23/2014 10:22:06
Go to Bottom of PageGo to Top of Page
  Previous Topic: Collections of Arrays in VB.NET Topic Next Topic: RichTextBox  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Print Preview ActiveX © Mandix Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000 Version 3.4.02