I am trying to print stored bitmap images in some printers. The program is a Windows Form. The command to print the logo (bitmap)-(if there is one stored) is:
port.Write("\x1C\x70\x01\x00");
('port' being my name for new serial port object).
There can be from 0 to 255 DEC (00 to FF HEX) different locations in the printers memory. I need a for loop or while loop that will increment the above line of code so,
port.Write("\x1C\x70\x01\x00"); would become
port.Write("\x1C\x70\x02\x00");
port.Write("\x1C\x70\x03\x00"); up to FF
port.Write("\x1C\x70\xFF\x00");
etc etc.
I looked on MSDN & Search Stack Overflow: