Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printer Status
Message
De
20/09/2010 03:13:43
 
 
À
19/09/2010 20:08:02
Sharath Shetty
Sri Krishna Consultancy Services
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01481905
Message ID:
01481953
Vues:
62
Hi,

In addition to what Naomi and Craig said...

There is a good source at msdn:

http://msdn.microsoft.com/en-us/library/aa394363(VS.85).aspx

and, although it is written in german, you might have a look at my blog entry about this:

http://tomsvfpblog.blogspot.com/2009/12/druckerstatus-abfragen.html
http://tomsvfpblog.blogspot.com/2010/04/druckerstatus-abfragen-teil-2.html


>I want to find the printer status Like ONLINE, OFFLINE, OUT OF PAPER etc.
>
>SYS(13) always return ready even when the printer is off ( because of spooling)
>
>I tired the code below it shows PrinterStatus = 3 for all available printer
>
>
>
>lcComputer = '.'
>loWMIService = Getobject('winmgmts:' ;
>    + '{impersonationLevel=impersonate}!\\' + lcComputer + '\root\cimv2')
>
>*!* loInstalledPrinters = loWMIService.ExecQuery ;
>    ("Select * from Win32_Printer Where PrinterStatus = '1' or PrinterStatus = '2'")
>
>loInstalledPrinters = loWMIService.ExecQuery ;
>    ("Select * from Win32_Printer ")
>
>For Each loPrinters In loInstalledPrinters
>CLEAR
>
>? loPrinters.GetObjectText_
>? loprinters.Name
> wait 
>Next
>
>RETURN
>
>
>
>Thanks in Advance
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform