How to Use InvalidateRect()to repaint the entire form?



How to Use InvalidateRect()to repaint the entire form?..

Answer / Mohd Adil Abbas

To repaint the entire form using InvalidateRect(), you can create a rectangle that covers the entire client area of the form and call InvalidateRect() with this rectangle as a parameter.n```delphinprocedure TForm1.Paint;nbeginn Canvas.Brush.Color := clCyan;n Canvas.Rectangle(ClientRect);nend;nprocedure TForm1.FormCreate(Sender: TObject);nbeginn InvalidateRect(Handle, ClientRect, False);nend;n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Delphi Interview Questions

How to Use mouse_event() to similate mouse events?

1 Answers  


Is Turbo Pascal still available?

1 Answers  


MS SQL error '17824 Unable to write to ListenOn connection ' what does this error mean?

1 Answers  


Explain Drag and Drop with Files?

1 Answers  


How to make your main form fill up the Desk Top space?

1 Answers  


How to Display a file's associated icon?

1 Answers   HCL,


How to use Access97 drivers with BDE 4.51 ?

1 Answers  


How to display seconds, minutes, tracks of an AVI ?

1 Answers  


What versions of Delphi are there?

1 Answers  


How to Allot CPU time ?

1 Answers  


'General SQL Error : Connection does not exist' in threaded application . what does this indicates?

1 Answers  


How to Test whether you are connected to the internet ?

1 Answers  


Categories