emblewembl
Programmer
I am having to print to a dot matrix printer at a clients site. I can send my text no problem, but I need to be able to send a hex or decimal number (NOT as a string) as a printer command in order to set up paper size amongst other things. At present I have a sub which lays out my text using the following type of code:
ev.Graphics.Drawstring("string goes here",f, Brushes.Black, 475, 40)
I can send ascii characters by using this :
ev.Graphics.Drawstring(Chr(78) + Chr(84) + Chr(45),f, Brushes.Black, 475, 40)
... and so on.
One of the commands I need to send involves sending 2 characters and then a digit which represents the total number of lines to print. My question is how can I send a number??? I know I can send an ascii representation of a digit, but it is then a string not a digit. Also, the only way I have found of printing this way is by using:
ev.Graphics.Drawstring ......
... which must mean everything sent this way ends up as a string. How can I send an integer?? Any suggestions would be very much appreciated!
i love chocolate
ev.Graphics.Drawstring("string goes here",f, Brushes.Black, 475, 40)
I can send ascii characters by using this :
ev.Graphics.Drawstring(Chr(78) + Chr(84) + Chr(45),f, Brushes.Black, 475, 40)
... and so on.
One of the commands I need to send involves sending 2 characters and then a digit which represents the total number of lines to print. My question is how can I send a number??? I know I can send an ascii representation of a digit, but it is then a string not a digit. Also, the only way I have found of printing this way is by using:
ev.Graphics.Drawstring ......
... which must mean everything sent this way ends up as a string. How can I send an integer?? Any suggestions would be very much appreciated!
i love chocolate