hi Martyr2
yes this does make sence and work great to print to Debug.Print but i would like this to paper as did the code i send was the part that takes the information in the textbox1 and prints it to paper. i am trying to do the same think but instead of getting the info from textbox1 i want to get it from listview1.
i am sorry if i was not clear about that in my first post.
CODE
Dim canvas As Graphics = e.Graphics
canvas.DrawString(TextBox1.Text, _font, _brush, 0, 0)
QUOTE(Martyr2 @ 31 Jan, 2008 - 05:34 PM)

Here is an example that will show you how to get at and print the contents of a listview and its subitems.
CODE
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' Setup variables of ListViewItem and ListViewSubItem
Dim lvwItem As ListViewItem
Dim lvwSubItem As ListViewItem.ListViewSubItem
' Counter for display purposes
Dim listviewcount As Integer = 1
' Loop through our listview items
For Each lvwItem In ListView1.Items
' Print the count
Debug.Print(listviewcount)
' Print the subitems of this particular ListViewItem
For Each lvwSubItem In lvwItem.SubItems
Debug.Print(lvwSubItem.ToString())
Next
' Increment the count (for display purposes)
listviewcount += 1
Next
End Sub
Just read the in code comments and you should see that we loop through the listview items. For each item we then loop through its subitem collection. So if we had two columns in our listview and the first was "test1" and its subitem was "value1" and the second was "test2" with the subitem "value2" we would see this in our debug window...
CODE
1
ListViewSubItem: {test1}
ListViewSubItem: {Value1}
2
ListViewSubItem: {test2}
ListViewSubItem: {Value2}
Hope that makes sense to you. Enjoy!
"At DIC we be listview code ninjas!"
