This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
        
            
      
          
            
               
                  #1
                  Posted
                  :
               
               Monday, June 19, 2006 9:59:47 AM(UTC)
               
             
            
          
       
      
         
            
               
                  
                  
                  
              
                
               
            
            
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
 
             
          
       
       
     
            
         
  
 
         
        
        
    
        
            
      
          
            
               
                  #2
                  Posted
                  :
               
               Wednesday, June 21, 2006 5:59:35 AM(UTC)
               
             
            
          
       
      
         
            
               
                  
                  
                  
              
                
               
            
            
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)
               
             
            
          
       
      
         
            
               
                  
                  
                  
              
                
               
            
            
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)
               
             
            
          
       
      
         
            
               
                  
                  
                  
              
                
               
            
            
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
 
            
            
          
         
       
       
     
            
         
  
 
         
        
        
    
        
            
      
          
            
               
                  #5
                  Posted
                  :
               
               Wednesday, July 19, 2006 9:22:29 AM(UTC)
               
             
            
          
       
      
         
            
               
                  
                  
                  
              
                
               
            
            
Groups: Registered
Posts: 8
 
            
            
          
         
             
            
               
	
                 
                   Bashar wrote:So, did it work?
 Bashar wrote:So, did it work?
 
yes it did :)
 
             
          
       
       
     
            
         
  
 
         
        
        
    
        
            
      
          
            
               
                  #6
                  Posted
                  :
               
               Wednesday, July 19, 2006 9:46:05 PM(UTC)
               
             
            
          
       
      
         
            
               
                  
                  
                  
              
                
               
            
            
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
 
            
            
          
         
       
       
     
            
         
  
 
         
        
        
    
    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.