printing using vb.net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, i am trying to print the same document to at 3 printers at the same time,
i tried using printdocument in looping fashion but they would wait for one
printer to print finish before going to the next printer to do the same
document print job. How do i overcome this problem, the key point is that i
want them to print at the same time, so i can save lots of time..

Pls enlightened me....thanks
 
Hi,

you could use threads,

Dim t As System.Threading.Thread
t = New System.Threading.Thread(AddressOf Printer1)
t.Start()
Dim t2 As System.Threading.Thread
t2 = New System.Threading.Thread(AddressOf Printer2)
t2.Start()
Dim t3 As System.Threading.Thread
t3 = New System.Threading.Thread(AddressOf Printer3)
t3.Start()

private sub Printer1
'do your printing to printer1
end sub
private sub Printer2
'do your printing to printer2
end sub
private sub Printer3
'do your printing to printer3
end sub

hth

Greetz Peter
 
Peter,

I often get the idea that people want to use multithreading only because
they want to use it and don't look at the dependencies. However I think that
this is a nice sample where it can be usefull in some situations. I will
remember it me for the next time.

:-)

Cor
 
Hi Cor,

I'm not much of a multithreader myself but I also thought that this was a
good situation to use it.

Greetz Peter
 
Hi Peter,

Thanks for your informations!!

Peter Proost said:
Hi Cor,

I'm not much of a multithreader myself but I also thought that this was a
good situation to use it.

Greetz Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top