Solved

not displaying text in trichedit

Posted on 2000-04-21
5
165 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now