I am beginning to learn GDI graphics in Delphi 7. I am having problems in drawing Ellipses , Text etc. on my Main form. Basically I use this code:
Form1.Canvas.TextOut(10,10,'sss');
Is this Canvas Property required to be associated with the Form? I haven’t done any thing like that. Help will be appreciated.
Make sure you put all painting code in the form’s
OnPaintevent handler (documentation). This handler is called whenever the form needs to be repainted.