Login  
Search All Forums
Dart Home | PowerTCP Emulation for .NET | Custom Development Reply | PowerTCP Emulation for .NET Topics | Forums   
AuthorForum: PowerTCP Emulation for .NET
Topic: VT cursor not scrolling.
adiaz04

From: USA
Posts: 2
Member Since: 03/18/16
posted March 18, 2016 2:55 AM

Is there any documentation on how to setup a VT with a raw tcp connection?

I can send and receive data, however the VT won't scroll when I type a command and press ENTER. It just moves the cursor to the beginning of the same line.
When I get a response from the server, it also appears on the same line.
Nick B (Admin)

From: Utica, NY USA
Posts: 584
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted March 18, 2016 3:47 PM

Hello,

The enter key normally generates a "\r" (Cr - Carriage return) character, which per the VT spec only returns the cursor to the beginning of the line. The "\n" (Lf - Line feed) character is what causes the cursor to move down a line.

If your server is basically echoing, can to substitute a "\r\n" (CrLf - Carriage return Line feed) when writing to the server. If you're using Vt.SetStream(), you can set Vt.NewLine to NewLine.CrLf for a CrLf to be substituted when the VT control writes to the stream; if you're not using Vt.SetStream(), you'll need to do that in your own code.

However, if your server is generating its own response that contains just a "\r", then you'll need to replace "\r" with "\r\n" when writing to our control.
adiaz04

From: USA
Posts: 2
Member Since: 03/18/16
posted March 18, 2016 4:05 PM

Hi Nick,

Thanks for the quick response.
So is there a VT property I need to change to treat the enter key as a CrLf? or do I just need to append add a Lf to the Cr before sending the command?

Thanks again.
Nick B (Admin)

From: Utica, NY USA
Posts: 584
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted March 18, 2016 4:37 PM

Hello,

That depends on whether you're using Vt.SetStream(), and how your server is replying.

If you're using Vt.SetStream() and your server is basically echoing what you send it, you can set Vt.NewLine to NewLine.CrLf, and the control will substitute a CrLf when the VT control writes to the stream.

If you're not using Vt.SetStream() and your server is basically echoing what you send it, you will need to append an Lf when sending a Cr to your server.

If your server is generating its own reply regardless of what you send it, you'll need to replace "\r" with "\r\n" when writing (Vt.Write) to our control.
Reply | PowerTCP Emulation for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX