How to make the form update correctly?

2

I have a screen in delphi that is updated constantly, is used together with a ratchet, every time a person puts the digital or type the password, this screen is updated with the information of this person.

The update call comes from a TThread.Synchronize . Previously I was using the TForm.Repaint after upgrading it to redraw the updated components. The problem is that by using direct form repaint, it redrawn the entire form, including components that were not updated, and had a GDI error that could not find a solution.

SoItookthisfunctionandI'musingrepaintonthecomponentsthatareupdated.

Afterclearingthescreen,orrefreshingtheinformation,I'musing:

pnlVencimento.RepaintpnlAluno.RepaintpnlStatus.Repaint

Allofthesepanelscontainlabelsinsidethem.Allareupdatednormallyatfirst,butafterafewhours,thepanelsbecomeblackandarenolongerupdated.

Thefollowingimage:

    
asked by anonymous 25.08.2015 / 14:08

0 answers