how to print the content of a list box ?

how to print the content of a list box ?

Page 1 of 1

6 Replies - 6835 Views - Last Post: 14 July 2010 - 09:34 AM Rate Topic: ***-- 2 Votes

#1 kikobaby  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 10-July 10

how to print the content of a list box ?

Posted 10 July 2010 - 07:33 AM

anyone know the solution? i need to print out the content of a listbox. thanks. urgent !!!
Is This A Good Question/Topic? 0
  • +

Replies To: how to print the content of a list box ?

#2 n8wxs  Icon User is offline

  • --... ...-- -.. . -. ---.. .-- -..- ...
  • member icon

Reputation: 972
  • View blog
  • Posts: 3,878
  • Joined: 07-January 08

Re: how to print the content of a list box ?

Posted 10 July 2010 - 03:09 PM

What does the ListBox contain?
Was This Post Helpful? 0
  • +
  • -

#3 Jack Eagles1  Icon User is offline

  • Pugnacious Penguin (inspired by no2pencil)
  • member icon

Reputation: 183
  • View blog
  • Posts: 1,152
  • Joined: 10-December 08

Re: how to print the content of a list box ?

Posted 10 July 2010 - 04:06 PM

Well... You could Draw the listbox to a bitmap, and then just print the image...
Was This Post Helpful? 1
  • +
  • -

#4 kikobaby  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 10-July 10

Re: how to print the content of a list box ?

Posted 14 July 2010 - 07:43 AM

View PostJack Eagles1, on 10 July 2010 - 03:06 PM, said:

Well... You could Draw the listbox to a bitmap, and then just print the image...

how to Draw the listbox to a bitmap
Was This Post Helpful? 0
  • +
  • -

#5 kikobaby  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 10-July 10

Re: how to print the content of a list box ?

Posted 14 July 2010 - 07:49 AM

View Postn8wxs, on 10 July 2010 - 02:09 PM, said:

What does the ListBox contain?


label.text and some textbox.text from a form.
Was This Post Helpful? 0
  • +
  • -

#6 Jack Eagles1  Icon User is offline

  • Pugnacious Penguin (inspired by no2pencil)
  • member icon

Reputation: 183
  • View blog
  • Posts: 1,152
  • Joined: 10-December 08

Re: how to print the content of a list box ?

Posted 14 July 2010 - 09:18 AM

Well. Add a button to your form, and add a picturebox to your form. Then double click the button, and add this code:

        Dim img As New Bitmap(ListBox1.Width, ListBox1.Height)
        ListBox1.DrawToBitmap(img, ListBox1.ClientRectangle)
        PictureBox1.Image = img



Replace Listbox1 with whatever the name of your listbox is.
Was This Post Helpful? 1
  • +
  • -

#7 kikobaby  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 10-July 10

Re: how to print the content of a list box ?

Posted 14 July 2010 - 09:34 AM

View PostJack Eagles1, on 14 July 2010 - 08:18 AM, said:

Well. Add a button to your form, and add a picturebox to your form. Then double click the button, and add this code:

        Dim img As New Bitmap(ListBox1.Width, ListBox1.Height)
        ListBox1.DrawToBitmap(img, ListBox1.ClientRectangle)
        PictureBox1.Image = img



Replace Listbox1 with whatever the name of your listbox is.


thanks ! =)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1