|
harryyadav wrote: i have visual studio 2005, i had installed ur Linecounter setup but it is not adding it in to addin manager pls help me where i m wrong and how i can launch linecounter
Ask the author of the addin...If you are using Visual C# Express, it won't work. I've had it work just fine in the other versions of VS 2005...
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
Hi,
I have a requirement as follows:
I am writing a server application which deals with printing files and some other tasks. My Application will send the files to printer, I want to monitor the status of the file whether its printed or printing or bloked.
How can I do that? Any help will be appreciated.
Thanx,
Sujan
.Net Programmer, Software Engineer
|
|
|
|
|
|
You should probably use WMI for this:
using System.Management;
....
{
ObjectQuery qry = new ObjectQuery("SELECT * FROM Win32_PrintJob");
ManagementObjectSearcher srchr = new ManagementObjectSearcher(qry);
ManagementObjectCollection coll = srchr.Get();
foreach (ManagementObject mo in coll)
{
string info = string.Format("Driver : {0}\r\nOwner : {1}\r\nName : {2}",
mo["DriverName"].ToString(),
mo["Owner"].ToString(),
mo["Document"].ToString()
);
Console.WriteLine(info);
}
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello Pete,
Is it possible to cancel a print job over the ManagementObject?
Thanks for youre time!
Martin
|
|
|
|
|
It is possible (and quite trivial actually). All you need to do with is to call mo.Delete(); to mimic selecting Cancel in the Print monitor.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello Pete,
Ok, what a suprise . Couldn't be easyer!
Thanks for your info.
Martin
|
|
|
|
|
Not a problem. Glad I could help.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete,
I could not find some properties in the ManagementObjects: Page size, and number of copies.
Plus, I have used a timer to keep getting a query at a fast rate. Even at this fast rate there is a possibility that it may miss an event or may miss some pages printed (opted to try and get the pages printed instead of using the total pages). Is there maybe another way to just retrieve all successfully printed print jobs?
Thanks.
Kevin.
|
|
|
|
|
How to get other people to code for me without lifting a finger myself on a simple search?
Give me's the codes!!!
-- modified at 11:53 Tuesday 19th December, 2006
Guess some people don't get sarcasm.
|
|
|
|
|
althamda wrote: How to get other people to code for me without lifting a finger myself on a simple search?
Pay them!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
blackmail them...
V.
If I don't see you in this world, I'll see you in the next one... And don't be late. (Jimi Hendrix)
|
|
|
|
|
Along the lines of 'my code will kill your code if you don't give me the code'?
|
|
|
|
|
something along those lines yeah
V.
No hurries, no worries
|
|
|
|
|
|
quiteSmart wrote: r u serious?????????
No, was merely a sarcastic comment aimed at people who can't be bothered to research anything before posting a question.
|
|
|
|
|
Well your Subject got quite a lot of attention. Maybe I'll try it the next time.
|
|
|
|
|
Just post the problem here. While most of us will not do homework for people, some clown will post the answer.
|
|
|
|
|
It's always good to post some over complicated/unreadable code for those that want their homework doing for them.
|
|
|
|
|
Is there a method that reverse a string.
Example: if string is "quiteSmart"
it should be changed to "tramSetiuq"
thanks
|
|
|
|
|
you've got to write it yourself..
ex.
<br />
string ReverseString(string txt) {<br />
StringBuilder str = new StringBuilder();<br />
for(int i = txt.Length - 1; i >= 0; i--)<br />
str.Append(txt[i]);<br />
return str.ToString();<br />
}<br />
|
|
|
|
|
Thanks,
i wrote my own methode,
thanks again
|
|
|
|
|
|
You know what i am completly lost.
i have worked out a method for that in the same post that you linked me to now and i completly forgot it.
ohhhhhhhhhhhhhhhhhhhhhhhhhhhh
i need to take a vacation from work
|
|
|
|
|
I was a little confused as I later saw the replies to that special post!
quiteSmart wrote: i need to take a vacation from work
good idea!
|
|
|
|