Click here to Skip to main content
15,890,973 members
Home / Discussions / C#
   

C#

 
QuestionMultiple Connections Pin
Rashid.Mahmood9-Nov-05 23:48
Rashid.Mahmood9-Nov-05 23:48 
AnswerRe: Multiple Connections Pin
Gulfraz Khan10-Nov-05 6:22
Gulfraz Khan10-Nov-05 6:22 
GeneralRe: Multiple Connections Pin
Rashid.Mahmood11-Nov-05 2:34
Rashid.Mahmood11-Nov-05 2:34 
QuestionAbout pdb file in C# Pin
webC#9-Nov-05 22:49
webC#9-Nov-05 22:49 
AnswerRe: About pdb file in C# Pin
Heath Stewart10-Nov-05 5:20
protectorHeath Stewart10-Nov-05 5:20 
QuestionHelp needed for Active Directory code Pin
Lasse Fabricius9-Nov-05 21:49
Lasse Fabricius9-Nov-05 21:49 
QuestionDirect Crystal Printing to LPT port - Please Help Pin
Craig G Fraser9-Nov-05 21:10
Craig G Fraser9-Nov-05 21:10 
AnswerRe: Direct Crystal Printing to LPT port - Please Help Pin
Heath Stewart9-Nov-05 21:56
protectorHeath Stewart9-Nov-05 21:56 
Have you considered just setting PrintOptions.PrinterName to an empty string (string.Empty, or just "") to use the default printer? In lieu of presenting the user with printer options this would provide a consistent user experience - print to the printer they selected as the default.

Based on the documentation it doesn't seem like you can refer to an LPT port.

If you want to find out the printer name on a specific LPT port, you could P/Invoke EnumPrinters http://msdn.microsoft.com/library/en-us/gdi/prntspol_9fjn.asp[^] and enumerate the printers till you find one installed on LPTx: (keeping in mind that a printer can be on more than one LPT port, so in that case a comma-delimited list is returned so be sure to parse that as well).

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft

[My Articles] [My Blog]
GeneralRe: Direct Crystal Printing to LPT port - Please Help Pin
Craig G Fraser9-Nov-05 22:32
Craig G Fraser9-Nov-05 22:32 
GeneralRe: Direct Crystal Printing to LPT port - Please Help Pin
Heath Stewart9-Nov-05 22:38
protectorHeath Stewart9-Nov-05 22:38 
GeneralRe: Direct Crystal Printing to LPT port - Please Help Pin
Craig G Fraser9-Nov-05 23:20
Craig G Fraser9-Nov-05 23:20 
AnswerRe: Direct Crystal Printing to LPT port - Please Help Pin
Heath Stewart10-Nov-05 5:11
protectorHeath Stewart10-Nov-05 5:11 
GeneralRe: Direct Crystal Printing to LPT port - Please Help Pin
Craig G Fraser10-Nov-05 21:42
Craig G Fraser10-Nov-05 21:42 
QuestionDrawing Lines On A Form Pin
ytubis9-Nov-05 21:07
ytubis9-Nov-05 21:07 
AnswerRe: Drawing Lines On A Form Pin
Heath Stewart9-Nov-05 21:45
protectorHeath Stewart9-Nov-05 21:45 
QuestionNeed Help with .NET Pin
allenmpcx9-Nov-05 19:26
allenmpcx9-Nov-05 19:26 
AnswerRe: Need Help with .NET Pin
AETaylor10-Nov-05 22:14
AETaylor10-Nov-05 22:14 
QuestionDifferent Source Codes Pin
nosferatu20009-Nov-05 19:23
nosferatu20009-Nov-05 19:23 
AnswerRe: Different Source Codes Pin
Luis Alonso Ramos9-Nov-05 19:35
Luis Alonso Ramos9-Nov-05 19:35 
QuestionMaskedTextBox Problem ! Pin
Caio19859-Nov-05 17:42
Caio19859-Nov-05 17:42 
GeneralRe: MaskedTextBox Problem ! Pin
Heath Stewart9-Nov-05 22:11
protectorHeath Stewart9-Nov-05 22:11 
QuestionRetrieving an image data type Pin
SyedZubair9-Nov-05 17:39
SyedZubair9-Nov-05 17:39 
AnswerRe: Retrieving an image data type Pin
Heath Stewart9-Nov-05 21:59
protectorHeath Stewart9-Nov-05 21:59 
QuestionException-When minimized and restored Pin
cloudking119669-Nov-05 17:34
cloudking119669-Nov-05 17:34 
AnswerRe: Exception-When minimized and restored Pin
Heath Stewart9-Nov-05 22:09
protectorHeath Stewart9-Nov-05 22:09 

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.