Click here to Skip to main content
15,919,434 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Comparing directories using VB.NET Pin
Ravi Mahavrathayajula9-Aug-07 2:30
Ravi Mahavrathayajula9-Aug-07 2:30 
GeneralRe: Comparing directories using VB.NET Pin
MartyK20079-Aug-07 2:46
MartyK20079-Aug-07 2:46 
GeneralRe: Comparing directories using VB.NET Pin
Ravi Mahavrathayajula14-Aug-07 3:54
Ravi Mahavrathayajula14-Aug-07 3:54 
GeneralRe: Comparing directories using VB.NET Pin
MartyK200714-Aug-07 4:10
MartyK200714-Aug-07 4:10 
QuestionKeyDown ... Enter , System do Beep Pin
kindman_nb8-Aug-07 8:30
kindman_nb8-Aug-07 8:30 
AnswerRe: KeyDown ... Enter , System do Beep Pin
The ANZAC8-Aug-07 13:03
The ANZAC8-Aug-07 13:03 
GeneralRe: KeyDown ... Enter , System do Beep Pin
kindman_nb8-Aug-07 14:48
kindman_nb8-Aug-07 14:48 
QuestionPrint of pdf file to network printer fails Pin
Nick De Decker8-Aug-07 8:23
Nick De Decker8-Aug-07 8:23 
Hello all,

Heard some great stuff about the code project so I decided to join the community and hope to be able to help others in the future as well.
Not yet there though since i'm fairly new to vb.net

Anyway: I need to print PDF files that are on disk to a network printer.
I searched for some printing code on the net and found several similar approaches.
However printing only seems to work to local printers, not network printers.
Even on local printers it sometimes fails.

I used the following code:

Dim PD As New System.Drawing.Printing.PrintDocument
Dim DefPrint As String = PD.DefaultPageSettings.PrinterSettings.PrinterName PD.DefaultPageSettings.PrinterSettings.PrinterName = .PrinterNaam
Dim NP As New Process()
NP.StartInfo.FileName = "c:\test.pdf"
NP.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
NP.StartInfo.Verb = "Print"
NP.Start()
NP.WaitForExit(9000)
If Not NP.HasExited Then
NP.Kill()
End If
PD.DefaultPageSettings.PrinterSettings.PrinterName = DefPrint


any way to improve this piece of code ?
it launches the print command to acrobat, but maybe there is a better trick to do the printing.
How comes this doesn't work for network printers ?

Thanks in advance,
Nick
QuestionTabindex Problems Pin
programmervb.netc++8-Aug-07 7:16
programmervb.netc++8-Aug-07 7:16 
AnswerRe: Tabindex Problems Pin
Luc Pattyn8-Aug-07 7:39
sitebuilderLuc Pattyn8-Aug-07 7:39 
AnswerRe: Tabindex Problems Pin
Tom Deketelaere8-Aug-07 21:10
professionalTom Deketelaere8-Aug-07 21:10 
GeneralRe: Tabindex Problems Pin
programmervb.netc++9-Aug-07 4:03
programmervb.netc++9-Aug-07 4:03 
GeneralRe: Tabindex Problems Pin
Tom Deketelaere9-Aug-07 4:24
professionalTom Deketelaere9-Aug-07 4:24 
AnswerRe: Tabindex Problems Pin
i gr89-Aug-07 8:44
i gr89-Aug-07 8:44 
QuestionUpdating a database when an application goes online Pin
steve_rm8-Aug-07 6:32
steve_rm8-Aug-07 6:32 
AnswerRe: Updating a database when an application goes online Pin
Kschuler8-Aug-07 7:55
Kschuler8-Aug-07 7:55 
QuestionEntering new Address group in Outlook Express thru VB Pin
Xandip8-Aug-07 2:54
Xandip8-Aug-07 2:54 
QuestionDatetime/Integer error Pin
aqzman_8-Aug-07 1:27
aqzman_8-Aug-07 1:27 
AnswerRe: Datetime/Integer error Pin
Tom Deketelaere8-Aug-07 1:38
professionalTom Deketelaere8-Aug-07 1:38 
GeneralRe: Datetime/Integer error Pin
aqzman_8-Aug-07 1:57
aqzman_8-Aug-07 1:57 
AnswerReply from Senthil.S for Datetime/Integer error Pin
Senthil S8-Aug-07 2:01
Senthil S8-Aug-07 2:01 
QuestionDetermine whether there is select item in the list Pin
Mekong River7-Aug-07 23:28
Mekong River7-Aug-07 23:28 
AnswerRe: Determine whether there is select item in the list Pin
Nilesh Hapse7-Aug-07 23:43
Nilesh Hapse7-Aug-07 23:43 
GeneralRe: Determine whether there is select item in the list Pin
Mekong River8-Aug-07 0:27
Mekong River8-Aug-07 0:27 
AnswerRe: Determine whether there is select item in the list Pin
Luc Pattyn7-Aug-07 23:54
sitebuilderLuc Pattyn7-Aug-07 23:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.