Solved

not displaying text in trichedit

Posted on 2000-04-21
5
186 Views
Last Modified: 2010-04-04
hi,
i am making my own terminal program and i am using a richedit component. when the userpresses a key, i don't want to display it in the rich edit box. in the onkeypress event i send it down the serial port. but i don't want it displayed on the screen as i said. but i don't want to disable the character visiblity completely because anything that comes down the serial line should show on the richedit box (i already did this). my only problem is to not show the characters that the user presses on his keyboard. how do i do this?
0
Comment
Question by:twilight_prince
5 Comments
 
LVL 2

Accepted Solution

by:
rene100 earned 50 total points
ID: 2737874
Hi

Add the follwing Line to the Code in the OnKeyPress-Event:

Key:=#0;


regards
rene

0
 
LVL 17

Expert Comment

by:inthe
ID: 2737893
listening..
0
 

Expert Comment

by:Zdhanko
ID: 2737918
In the onkeypress event supress key handling like this
procedure TForm1.RichEdit1KeyPress(Sender: TObject; var Key: Char);
begin
{Send Key to COM Port-> Here your code}
Key:=char(#0);
end;
 
0
 
LVL 3

Expert Comment

by:bryan7
ID: 2739465
you can also use a secondary richedit to enter the lines
0
 
LVL 17

Expert Comment

by:inthe
ID: 2739986
hi ,
actually you can simply do this by just set the richedit to readonly in the object inspector or on form create event.

richedit1.readonly := true;

cheers Barry
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question