On Sep 28, 2006, at 7:27 AM, Terry Ford wrote:

Change the order of your code lines to the following.

  Dim s, s1, s2, s3, s4, s5, s6 as string
  Dim index,i as integer
  Dim x,y as integer
  x = 100
  y = 30
  index = ListBox1.ListCount - 1
  i = 0

  Dim g As Graphics
  g  = OpenPrinterDialog()

  If g<> Nil then

    For i = 0 to index

Is the first column empty? If s1 is for the first column remember that column 0 is the first one.

      s1 = ListBox1.Cell(i,0)
      s2 = ListBox1.Cell(i,1)
      s3 = ListBox1.Cell(i,2)
      s4 = ListBox1.Cell(i,3)
      s5 = ListBox1.Cell(i,4)
      s6 = ListBox1.Cell(i,5)
s = s1 + " - " + s2 + " - " + s3 + " - " + s4 + " - " + s5 + " - " + s6
      g.DrawString s , x, y

Your Brackets are unnecessary

      y=y + 10
    next

  End If

You might also want to adjust y=y+10 to something a bit larger.

That's assuming you are not using a very small font.

Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to