Click here to Skip to main content
15,896,473 members
Home / Discussions / C#
   

C#

 
Questionsend byte array to a printer and reading back through a serial port Pin
bttds23-Sep-07 20:36
bttds23-Sep-07 20:36 
AnswerRe: send byte array to a printer and reading back through a serial port Pin
Christian Graus23-Sep-07 21:04
protectorChristian Graus23-Sep-07 21:04 
GeneralOT Pin
Pete O'Hanlon23-Sep-07 21:47
mvePete O'Hanlon23-Sep-07 21:47 
GeneralRe: send byte array to a printer and reading back through a serial port Pin
bttds23-Sep-07 22:22
bttds23-Sep-07 22:22 
AnswerRe: send byte array to a printer and reading back through a serial port Pin
Guffa23-Sep-07 22:50
Guffa23-Sep-07 22:50 
GeneralRe: send byte array to a printer and reading back through a serial port Pin
bttds23-Sep-07 23:34
bttds23-Sep-07 23:34 
QuestionPrinting a file using process object Pin
gauthee23-Sep-07 20:04
gauthee23-Sep-07 20:04 
AnswerRe: Printing a file using process object Pin
blackjack215024-Sep-07 0:23
blackjack215024-Sep-07 0:23 
gauthee wrote:
i have used the process and process start info objects and could complete the task bu the constraint is while printing the original file is being opened!


You mean is opened in Word of Excel, etc?

If so, one solution would be to wait until the file has been sent to the printer(by periodically checking the number of print jobs) and after that close the main application.

The first part can be achieved with this(code suggested by Martin#):

ObjectQuery qry = new ObjectQuery("SELECT * FROM Win32_PrintJob");<br />
ManagementObjectSearcher srchr = new ManagementObjectSearcher(qry);<br />
ManagementObjectCollection coll = srchr.Get();<br />
<br />
int initialJobs = coll.Count;<br />
<br />
while (coll.Count == initialJobs)<br />
{<br />
  System.Threading.Thread.Sleep(10);<br />
  coll = srchr.Get();<br />
}


Good luck!
QuestionCompare 2 datasets Pin
Anu SE23-Sep-07 19:57
Anu SE23-Sep-07 19:57 
AnswerRe: Compare 2 datasets Pin
gauthee23-Sep-07 20:19
gauthee23-Sep-07 20:19 
AnswerRe: Compare 2 datasets Pin
Jintal Patel23-Sep-07 20:50
Jintal Patel23-Sep-07 20:50 
GeneralRe: Compare 2 datasets Pin
Anu SE23-Sep-07 21:00
Anu SE23-Sep-07 21:00 
GeneralRe: Compare 2 datasets Pin
Jintal Patel23-Sep-07 21:17
Jintal Patel23-Sep-07 21:17 
GeneralRe: Compare 2 datasets Pin
Anu SE23-Sep-07 21:22
Anu SE23-Sep-07 21:22 
GeneralRe: Compare 2 datasets Pin
Jintal Patel24-Sep-07 0:59
Jintal Patel24-Sep-07 0:59 
AnswerRe: Compare 2 datasets Pin
Lutosław24-Sep-07 0:51
Lutosław24-Sep-07 0:51 
QuestionVirtual Function and "New" modifier Pin
.NET- India 23-Sep-07 19:44
.NET- India 23-Sep-07 19:44 
AnswerRe: Virtual Function and "New" modifier Pin
Nitin S23-Sep-07 20:18
professionalNitin S23-Sep-07 20:18 
GeneralRe: Virtual Function and &quot;New&quot; modifier Pin
Malcolm Smart23-Sep-07 21:17
Malcolm Smart23-Sep-07 21:17 
GeneralRe: Virtual Function and &amp;amp;quot;New&amp;amp;quot; modifier Pin
Lutosław24-Sep-07 0:10
Lutosław24-Sep-07 0:10 
GeneralRe: Virtual Function and &amp;amp;quot;New&amp;amp;quot; modifier Pin
Malcolm Smart24-Sep-07 0:35
Malcolm Smart24-Sep-07 0:35 
QuestionMessage Removed Pin
23-Sep-07 19:34
professionalNitin S23-Sep-07 19:34 
AnswerRe: How to play mp3 files using c#??? [modified] Pin
Malcolm Smart23-Sep-07 20:59
Malcolm Smart23-Sep-07 20:59 
GeneralRe: How to play mp3 files using c#??? [modified] Pin
Nitin S23-Sep-07 21:31
professionalNitin S23-Sep-07 21:31 
GeneralRe: How to play mp3 files using c#??? Pin
Malcolm Smart23-Sep-07 21:37
Malcolm Smart23-Sep-07 21:37 

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.