G
Guest
Dear all,
I'm using VB6 need to convert to C# for printing. In VB6 I will send some
printer command into the printer as below:-
Printer.Print "TESTING LINE 1"
Printer.Print "TESTING LINE 2"
Printer.Print Chr$(&H1C); "(L"; Chr$(66); Chr$(49);
Printer.Print Chr$(&H1D); "V"; Chr$(49);
Printer.Print Chr$(&H1C); "(L"; Chr$(67); Chr$(50);
In C# I'm writing a text file and open LPT1 to print some lines, the problem
is how to convert those VB6 codes into C# ?
I've try using some sample code as below :-
writer.WriteLine ("TESTING LINE 1" + ((char) 13));
writer.WriteLine ("TESTING LINE 2" + ((char) 13));
writer.WriteLine( ((char)&H1C) + "(L" + ((char)66) + ((char)49));
But there are errors on the above codes. Please provide solutions and
examples.
Thanks in advance
Cheers,
Mae
I'm using VB6 need to convert to C# for printing. In VB6 I will send some
printer command into the printer as below:-
Printer.Print "TESTING LINE 1"
Printer.Print "TESTING LINE 2"
Printer.Print Chr$(&H1C); "(L"; Chr$(66); Chr$(49);
Printer.Print Chr$(&H1D); "V"; Chr$(49);
Printer.Print Chr$(&H1C); "(L"; Chr$(67); Chr$(50);
In C# I'm writing a text file and open LPT1 to print some lines, the problem
is how to convert those VB6 codes into C# ?
I've try using some sample code as below :-
writer.WriteLine ("TESTING LINE 1" + ((char) 13));
writer.WriteLine ("TESTING LINE 2" + ((char) 13));
writer.WriteLine( ((char)&H1C) + "(L" + ((char)66) + ((char)49));
But there are errors on the above codes. Please provide solutions and
examples.
Thanks in advance
Cheers,
Mae