Get telnet terminal control to output to printer RRS feed

  • Question

  • Hi guys,

    I work for a retail book company and the system that we use at our stores is an IBM Universe system the we connect to using telnet.  All of the stores use a VB6 program that opens a telnet terminal control as their point of sale systems.
    We are wanting to update this program to the .Net platform written in C#.  I have completed most of the coding for this using the ComponentPro telnet terminal control.  The problem I am having is getting the telnet control to print to the receipt printer that is connected to the register PC by serial/COMM port.  Is it possible to use the telnet terminal control to get the output from the telnet session so that I can send it to the receipt printer?  So for example when an employee logs into the register the store information and employee information is printed at the top of the receipt.

    Thanks in advanced for any help.

    Thursday, August 1, 2019 3:39 AM


  • Oh, nevermind. I was able to get this working.  What I did was use the DataReceivedEventHandler and then from the I took the raw data from the event args and I was able to pass that into the serial port.

    So my code looked like this:

    this.telnetCTL.DataReceived += new ComponentPro.Net.Terminal.DataReceivedEventHandler(TelnetCtlDataReceived);
     private void TelnetCtlDataReceived(object sender, DataReceivedEventArgs e) {
                    string output = e.RawData;

    Plus there was some more code to pull out the actual data that needed to be printed.

    If anyone have the same issues like me, this will definetely help: Capturing and recording communication

    Thank for your read

    Thursday, August 1, 2019 4:08 AM