My Code:
Code
PrintDialog printDia = new PrintDialog();Code
printDia.PrinterSettings = new PrinterSettings();Code
DialogResult result = printDia.ShowDialog();Code
StringBuilder sb = new StringBuilder();Code
sb.AppendLine("<STX><ESC>A");Code
sb.AppendLine("<ESC>H0001<ESC>V0001<ESC>XM45676567");Code
sb.AppendLine("<ESC>Q1");Code
sb.AppendLine("<ESC>Z<ETX>");Code
String output = sb.ToString().Replace("<ESC>", ((char)27).ToString());Code
output.Replace("<STX>",((char)2).ToString());Code
output.Replace("<ETX>", ((char)3).ToString());Code
if (result == DialogResult.OK)Code
{ RawPrinterHelper.SendStringToPrinter(printDia.PrinterSettings.PrinterName, output); }
Answers
Know the answer? Post it. Somebody with the same question will find it here.