Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 131,719 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,324 people online right now. Registration is fast and FREE... Join Now!




Printing Content of a listbox

 
Reply to this topicStart new topic

Printing Content of a listbox

XandrilZaax
post 4 Jun, 2006 - 02:37 PM
Post #1


New D.I.C Head

*
Joined: 1 Jun, 2006
Posts: 39


My Contributions


Does anyone know the code to print the contents of a listbox and nothing else?

This post has been edited by XandrilZaax: 4 Jun, 2006 - 02:37 PM
User is offlineProfile CardPM

Go to the top of the page

Jayman
post 4 Jun, 2006 - 03:51 PM
Post #2


Student of Life

Group Icon
Joined: 26 Dec, 2005
Posts: 6,827



Thanked 38 times

Dream Kudos: 500

Expert In: C#, VB.NET, Java

My Contributions


I am assuming you mean to a printer and not to the screen, correct?

You need to use the e.Graphics.DrawString method to print to a printer.

Here is where you can find information on how to do it.
User is online!Profile CardPM

Go to the top of the page

XandrilZaax
post 4 Jun, 2006 - 07:22 PM
Post #3


New D.I.C Head

*
Joined: 1 Jun, 2006
Posts: 39


My Contributions


Okay, I've got the basic code down, but is there something special I need to do since its a listbox? Or do I just define its dimensions on the main form?

Does this look semi-right? :

CODE
e.Graphics.DrawString("Print", _
      New Font("Courier New", 9), Brushes.Black, 100, 100)
User is offlineProfile CardPM

Go to the top of the page

devonknows
post 20 Dec, 2006 - 10:55 AM
Post #4


New D.I.C Head

*
Joined: 30 Nov, 2006
Posts: 5


My Contributions


Hi Im just querin did you ever finish the code to printing the listbox as im interested n cant make heads or tails of the link above, was wondering if someone could explain it to me at all.

Any help or a Tutorial would be most appreciated

Kind Regards
Devon.

QUOTE(XandrilZaax @ 4 Jun, 2006 - 08:22 PM) *

Okay, I've got the basic code down, but is there something special I need to do since its a listbox? Or do I just define its dimensions on the main form?

Does this look semi-right? :

CODE
e.Graphics.DrawString("Print", _
      New Font("Courier New", 9), Brushes.Black, 100, 100)


User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/20/08 10:00AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month