BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to draw on a form.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
Thaddeus L. Olczyk
Guest





PostPosted: Thu Oct 14, 2004 4:29 am    Post subject: How to draw on a form. Reply with quote



There are times when I need to be able to make simple drawings on a
form. I used to do this a lot but can't remember how.

IIRC the basic idea was to put a TPanel on the Form
then put two images. One I display, the other I get
yhe canvas of then draw to. Then I toggle the visible and the drawn,
to give me flickier free drawing. The problem is that this is real
slow. Suggestions?
Back to top
Hans Galema
Guest





PostPosted: Thu Oct 14, 2004 7:41 am    Post subject: Re: How to draw on a form. Reply with quote



Thaddeus L. Olczyk wrote:
Quote:
There are times when I need to be able to make simple drawings on a
form. I used to do this a lot but can't remember how.

You can draw on a TForm::Canvas directly with TextOut(), LineTo()
and so on.

You can put a TPaintBox on a TForm. Now you can draw in
an area of the TForm.

Quote:
IIRC the basic idea was to put a TPanel on the Form
then put two images.

Technically you do not need a TPanel.

Quote:
One I display, the other I get
yhe canvas of then draw to. Then I toggle the visible and the drawn,
to give me flickier free drawing. The problem is that this is real
slow. Sugg

One TImage will do. Take a Graphics::TBitMap::Canvas to draw on
and copy the result to the TImage.

You said "simple drawings", well than a TPaintBox would do always.
Just put your code in TPaintBox::OnPaint.

Hans.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.