Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, June 19, 2006 9:59:47 AM(UTC)
Bob Neville

Groups: Registered
Posts: 8


Visual Studio 2005 / Framework 2.0 / Leadtools 14.5 / Budweiser Lite 1.0

I'm trying to get the Badcode component to work with the RasterImageViewer

leadRasterImageViewer = New RasterImageViewer

With LEADBarCode

.UnlockSupport(LEADLib.SupportLockConstants.L_SUPPORT_BARCODES_1D, LeadSupport.Support.Barcodes1dKey)

.Bitmap = RasterImageConverter.ToLeadBitmap(leadRasterImageViewer.Image, "LTR14N.DLL")

.EnableGetSizeMethod = False

.Linear.EnableWriteText = True

.Linear.EnableErrorCheck = True

.EnableUseColors = False

.EnableTransparent = False

.Units = LTBARLib.tagBARCODE_UNITS.BARCODE_INCHES

nRet = LEADBarCode.Write(LTBARLib.tagBARCODE_1D_TYPES.BARCODE_1D_CODE_128, "012345678901", 0, 0, 2, 1)

 

.Bitmap = 0

End With

I get no error but (nret=0) but the barcode does not appear, How do you force repaint with a RasterImageViewer ? Refresh sufficiente?

also I was unable to turn off the nag message. I copied the nonag to the system directory. But it keeps appearing.

 

Thanks

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, June 21, 2006 5:59:35 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

The ToLeadBitmap method allocates new memory and stores the converted
image in it.  Therefore, any updates you make to the returned bitmap will not be reflected in the original IRasterImage.

After the call to LEADBarCode.Write, try calling FromLeadBitmap to convert LEADBarCode.Bitmap (which should contain the bitmap with the barcode by now) back to an IRasterImage.

Note that you will need to free the data returned by ToLeadBitmap.

 
#3 Posted : Tuesday, July 18, 2006 4:47:23 AM(UTC)
Bob Neville

Groups: Registered
Posts: 8


    Private Sub BarcodePage(ByVal BatchControlSheetType As String)
        Dim Label As String = ""

        Dim intBarTop As Integer = 3100
        Dim intBarLeft As Integer = 1200

        Dim intOffset As Integer = 0
        Dim intBarWidth As Integer = 1700
        Dim intCharWidth As Integer = 100

        LoadBCS(BatchControlSheet)

        With AxLEADBarCode
            .UnlockSupport(LEADLib.SupportLockConstants.L_SUPPORT_BARCODES_1D, LeadSupport.Support.Barcodes1dKey)
            .Bitmap = RasterImageConverter.ToLeadBitmap(leadRasterImageViewer.Image, "LTR14N.DLL")

            .EnableGetSizeMethod = False
            .Linear.EnableWriteText = True
            .Linear.EnableErrorCheck = True
            .EnableUseColors = False
            .EnableTransparent = False
            .Units = LTBARLib.tagBARCODE_UNITS.BARCODE_SCANLINES_PER_PIXELS

            If AxLEADBarCode.Write(LTBARLib.tagBARCODE_1D_TYPES.BARCODE_1D_CODE_128, BatchControlSheetType, intBarLeft, intBarTop, intBarWidth, intCharWidth) = 0 Then
                intBarTop = 300
                intBarLeft = 200
                If Len(txtYear.Text) > 0 Then
                    Label = String.Concat("Drawer : ", txtYear.Text, "-", txtMonth.Text, "-", txtID.Text, txtBPCNo.Text)
                End If
                If Len(Label) > 0 Then
                    intBarWidth = Len(Label) * intCharWidth
                    If intBarWidth > 1100 Then
                        intBarWidth = 1100
                    End If
                    If AxLEADBarCode.Write(LTBARLib.tagBARCODE_1D_TYPES.BARCODE_1D_CODE_128, Label, intBarLeft, intBarTop, intBarWidth, intCharWidth) = 0 Then
                        leadRasterImageViewer.Image = RasterImageConverter.FromLeadBitmap(.Bitmap, "LTR14N.DLL")
                    Else
                        Beep()
                    End If
                End If
                .Bitmap = 0
            End If
        End With
    End Sub
--------------------------------------

Thanks!!

 

 
#4 Posted : Wednesday, July 19, 2006 12:17:53 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

So, did it work?

 
#5 Posted : Wednesday, July 19, 2006 9:22:29 AM(UTC)
Bob Neville

Groups: Registered
Posts: 8


 Bashar wrote:So, did it work?

 

yes it did :)

 
#6 Posted : Wednesday, July 19, 2006 9:46:05 PM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Great!

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.088 seconds.