Home > Software engineering >  VB how to send the printer maintenance command
VB how to send the printer maintenance command

Time:09-28

As title, I have a remote printers, print before they make a "clean the print head", the following figure, ordered, remote printers can start cleaning the print head, I'd like to send this network command should be monitoring (get its send command format or something), now I can't think of every time point to open a control panel, and points out the interface to such operations, want to directly use VB to realize point began to cleaning, ask god to give directions, thank you very much!

CodePudding user response:

If you cannot find the hardware "command communication" operation interface (API) related driving data, that is difficult to achieve,
Unless you put it the control panel of the CPL file the disassembly, and understand what it calls the API, what kind of parameters passed,
Otherwise can't direct implementation in their programs,

Have a more realistic way, be in VB, "click" open the control panel window, and then for the corresponding operation in this window,
Instead of from the system of "control panel" to find and open it again,

CodePudding user response:

This window to be brought out,

And then take a window handle or something...

CodePudding user response:

refer to the second floor vansoft response:
this window to be brought out,

And then take a window handle or something...

Bring up the "printer preferences" I'd have code:
 
Call the Shell (" rundll32 printui. DLL, PrintUIEntry/e/n "" "& amp; Printer. DeviceName & amp; "" "", vbHide) 'display printer preferences


Actually I want to can directly send a remote printer port "cleaning the print head" "command" to go, or if I can through the sniffer software to capture network packets, such as what is the commands it sends, thus to obtain the method?

CodePudding user response:

I use Delphi control zebra print bar code printers, printer, there is some code I search, using VB program to control you,

CodePudding user response:

reference 4 floor kxltsuperr response:
I use Delphi control zebra print bar code printers, printer, there is some code I search, using VB program to control you,


Thanks, printer, probably code is not the same, below is I caught with caught software information (remote when cleaning the print head scratching), from the aspects, helpless look not to understand (feel it also used a lot of other network protocols),

CodePudding user response:

The original poster or idea to look up the information about the "communication",

CodePudding user response:

reference Carlven2012 reply: 3/f
Quote: refer to the second floor vansoft response:

This window to be brought out,

And then take a window handle or something...

Bring up the "printer preferences" I'd have code:
 
Call the Shell (" rundll32 printui. DLL, PrintUIEntry/e/n "" "& amp; Printer. DeviceName & amp; "" "", vbHide) 'display printer preferences


Actually I want to can directly send a remote printer port "cleaning the print head" "command" to go, or if I can through the sniffer software to capture network packets, such as what is the commands it sends, thus to obtain the method?


I not call, impression of a cycle, determine the menu name, and then direct call, can come out,
  • Related