This is the last article in the Bill printing series, mainly code implementation.
For Paper settings in this article, see http://www.cnblogs.com/babyt/articles/116792.html in the previous article.
Set of Implementation ideas, please refer to this http://www.cnblogs.com/babyt/articles/116794.html
This method is applicable to Epson/star/tally all series dot matrix printers,
It should be noted that some printers use their own programs, but they do not have good control over the paper. For the following Printers:
Star ar 3200/3200 +, star ar 6400, and tally 2660 must use the Epson 1600k driver.
Core code
Private sub form_keydown () sub form_keydown (keycode as integer, shift as integer)
If keycode = vbkeyreturn then
If msgbox ("do you want to print? ", Vbokcancel + vbdefaultbutton1," Print prompt ") = vbok then
'Cancel the background image
Me. Picture = loadpicture ("")
'Set the paper type
Call selectform ("landline Bill", me. hwnd)
'Print
Me. printform
'Unmount the form
Unload me
End if
End if
End sub
Selectform is a paper-type selection function, which uses a foreign function.
Not much. For details, see the complete code.
Code download, winrar3.1 compression, password:
Www. facesun. cn
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.