borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2009 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Making a wait time between lines of code)Next Topic (manage print job) New Topic New Poll Post Reply
AndreaVB Forum : Printing : I can't get the real State of a job... Why?
Poster Message
supera
Level: Guest


icon I can't get the real State of a job... Why?

Hi,
I wrote this
[
For nJob = 0 To GetPrinterQueue(Printer.DeviceName) - 1
          'MsgBox "STATUS = " & JobsDesc(nJob).Status & " pSATUS = " & JobsDesc(nJob).pStatus
          If (UCase(Right(JobsDesc(nJob).pMachineName, Len(JobsDesc(nJob).pMachineName) - 2)) = UCase(WskPrint.LocalHostName)) _
             And (JobsDesc(nJob).Status <> JOB_CONTROL_PAUSE) Then
    PrinterCommand Printer.DeviceName, nJob, PRINTER_CONTROL_PAUSE, JOB_CONTROL_PAUSE
           End If
        Next
]
But when the Job is Paused, the program always execute the "PrinterCommand" instruction... And I remark that my "JobsDesc(nJob).Status" is "17" ...
In fact, I would like my program to pause only the Jobs which aren't paused...
What's false in the code I've write?

Thanks in advance for ur help.

09-08-2002 at 02:48 PM
| Quote Reply
Merrion
Level: VB Guru

Registered: 15-04-2002
Posts: 37
icon Re: I can't get the real State of a job... Why?

JOB_CONTROL_PAUSE is not a status, it is a command that you send to pause the job.

See this list of valid print job status values.

HTH,
  Duncan

____________________________
--8<------------------------------
Free components and source code - see http://www.merrioncomputing.com/Download/index.htm for details

12-08-2002 at 11:26 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
cyber
Level: Guest

icon Re: I can't get the real State of a job... Why?

sorry,please,
i'd like to know which APIs you use to control a job on the printer.And also,if it is possible that you gave a sample of code which can allow me to count al the copies sent to the printer.

05-03-2003 at 10:29 PM
| Quote Reply
supera
Level: Guest

icon Re: I can't get the real State of a job... Why?

Mail me at stl0410@yahoo.com and please remember me your question. I'll send you the answer back.
Bye,
Supera.

06-03-2003 at 07:00 AM
| Quote Reply
AndreaVB Forum : Printing : I can't get the real State of a job... Why?
Previous Topic (Making a wait time between lines of code)Next Topic (manage print job) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2009 Andrea Tincaniborder