2 Attachment(s)
[RESOLVED] How to show the Print Queue dialog and some other printer stuff
Hello to everybody
I am pretty sure I am describing somewhat the wrong way but I can't find a way to show this window via VB6
pretty much like going to Devices and Printers and double click on the Printer
Attachment 184501
I just want to pass the printer name and show this matching dialog .
Also if is not much bother how I turn "Use Printer Offline"
Attachment 184502
this on and off
It seems in the Printer API there is more than one offline and I did found how to put the printer to Offline/Online (PRINTER_CONTROL_SET_STATUS) but not how to make
the switch in the offline usage.
TIA
Re: How to show the Print Queue dialog and some other printer stuff
Looking in Task-Manager, i see that window is running in a "rundll32"-context....
going by this: https://docs.microsoft.com/en-us/win...ndll32-printui
i'd try a "shell("rundll32 printui.dll PrintUIEntry /o /n\\MyHostName\MyPrintername")"
Re: How to show the Print Queue dialog and some other printer stuff
Thanks man.. I will check it
Re: How to show the Print Queue dialog and some other printer stuff
Well this was the solution thanks Zvoni
Code:
Shell ("rundll32 printui.dll PrintUIEntry /o /n ""name of printer")
I will wait a bit if someone resolves also the turning on/off
Re: How to show the Print Queue dialog and some other printer stuff
Quote:
Originally Posted by
masteripper
Well this was the solution thanks Zvoni
Code:
Shell ("rundll32 printui.dll PrintUIEntry /o /n ""name of printer")
I will wait a bit if someone resolves also the turning on/off
from WIN+R i'd try a
rundll32 printui.dll, PrintUIEntry /Xg /n"Printer Name"
and then look for "Status"... play around with it (toggle on/off) with running the command every time
with the "/Xs"-Switch you can set settings
Re: How to show the Print Queue dialog and some other printer stuff
Quote:
Originally Posted by
Zvoni
from WIN+R i'd try a
rundll32 printui.dll, PrintUIEntry /Xg /n"Printer Name"
and then look for "Status"... play around with it (toggle on/off) with running the command every time
with the "/Xs"-Switch you can set settings
Cool .. I was expecting a rather hard API solution but this should do...
Thanks man
Re: How to show the Print Queue dialog and some other printer stuff
Quote:
Originally Posted by
masteripper
Cool .. I was expecting a rather hard API solution but this should do...
Thanks man
There might be an API-Solution, but at a guess the "printui.dll" was written with "cdecl"-convention, so you might have to jump through some hoops.
Found this: https://www.pinvoke.net/default.aspx...UIEntryW.html#
Re: How to show the Print Queue dialog and some other printer stuff
Quote:
Originally Posted by
Zvoni
Thanks again my friend.