title: Printing bar codes on Star TSP100 in Delphi 7
body: <p>I have a <a href="http://www.starmicronics.com/Printer/PrinterDesc.aspx?PageId=1&amp;PrinterId=40" rel="nofollow">Star Micronics TSP100 printer</a> that I'm trying to use via <a href="http://www.starmicronics.com/absolutefm/absolutefm/attachments/142/2%20TSP100%20OPOS.pdf" rel="nofollow">OPOS</a> from Delphi 7.  I cannot seem to make it print barcodes.</p>
  
  <p>I can Open, claim and enable, print text and cut, but not print barcodes.</p>
  
  <p>I have tried many methods of importing an Active X control to handle the printer, just like I have for a Bixolon Samsung POS printer, which works fine. </p>
  
  <p>Any pointers welcome.<br />
  Code:</p>
  
  <pre><code>procedure TForm1.OpenbtnClick(Sender: TObject);
  begin
    showmessage(inttostr( posprinter1.Open('StarTSP100')));
  end;
  
  procedure TForm1.ClaimbtnClick(Sender: TObject);
  begin
     showmessage(inttostr( posprinter1.ClaimDevice(0)));
  end;
  
  procedure TForm1.EnablebtnClick(Sender: TObject);
  begin
    POSPrinter1.DeviceEnabled := True;
  end;
  
  procedure TForm1.PrintbtnClick(Sender: TObject);
  begin
    POSPrinter1.PrintNormal(2,'A Test' + #10);
  end;
  
  procedure TForm1.PrintBCbtnClick(Sender: TObject);
  begin
    POSPrinter1.PrintBarCode(2, '1234567890', 108, 1000, trunc(POSPrinter1.RecLineWidth * 0.8), -2, -13);
  end;
  
  procedure TForm1.CutbtnClick(Sender: TObject);
  begin
    POSPrinter1.CutPaper(100);
  end;
  
  end.
  </code></pre>