Image and Label Refrash[resolved] lazarus / 13-General ---------------------------------------------------------------------- Drakon · 2010-01-26 13:49 In my old application in Delphi, on the desktop there was an image that was the menu and labels that change color when the mouse hovers over them, now in lazarus the picture is flashing, somebody knows any solution because I tried various command Update without success. Can anyone help me? or already experienced the same problem? ---------------------------------------------------------------------- Leledumbo · 2010-01-27 03:35 Quotenow in lazarus the picture is flashingYou mean flickers? Try setting DoubleBuffered to true. ---------------------------------------------------------------------- Drakon · 2010-01-27 13:56 let me explain, I have a label, which will be the hours, and I also have a timer that in intervalors of 1000 milliseconds Trading caption for the current hours. But the label flashes this exchange, as if he was "visible: = False" and "Visible: = True" in this moment of exchange of label ---------------------------------------------------------------------- Zaher · 2010-01-27 21:57 Do use for update TLabel Label1.Visible := False; Label1.Visible := True; if yes you must use Label1.Refresh; ---------------------------------------------------------------------- Wodzu · 2010-01-27 22:23 Drakon. It works here. What I did: 1. New Application 2. TImage on the form -> loaded some picture 3. Puted TLabel on TImage with a BIG font 4. Puted TTimer. 5. Filled OnTimer event Code: [Select]procedure TForm1.Timer1Timer(Sender: TObject); begin   Label1.Caption := DateTimeToStr(Now); end; Works without flickering! ---------------------------------------------------------------------- Drakon · 2010-01-28 21:41 thanks to two for the attempted solution, but still the problem persists, is it because I am using windows seven?, Wodzu you understood my problem perfectly, but like many attempts my funcionatam not, his did not work, you have some other possible solution to this? see example the my problem http://rapidshare.com/files/342604723/problem.zip.html ---------------------------------------------------------------------- malcome · 2010-01-29 03:46 Certainly flashing on windows vista with "Classic" theme. but no flashing with "Windows Vista" theme. Probably it is a problem of Laz. ---------------------------------------------------------------------- Wodzu · 2010-01-29 07:51 Drakon, I was testing my example on Windows 7. As malcome said, it could be the theme related problem. What theme are you using? I'll check differen themes with your example when I get back from work. ---------------------------------------------------------------------- Drakon · 2010-01-29 18:54 Wodzu, what malcom said the problem can be really, I'm currently in my work, but coming home test immediately and return it to you, really I am using classic theme of Windows 7. Thank you all for your attention! ---------------------------------------------------------------------- Zaher · 2010-01-29 19:57 I guess the problem in EreaseBackground and Paint the Background filled with back color twice before Label painted try to stop paint background Code: [Select]  public     procedure EraseBackground(DC: HDC); override; procedure TMyForml.EraseBackground(DC: HDC); begin end; but that make problem with you, if happned paint the background in Paint Code: [Select]procedure TMyPanel.Paint; begin   inherited;   Canvas.Brush.Color := Color;   Canvas.Brush.Style := bsSolid;   Canvas.FillRect(ClientRect); end; Because there is a time between WM_ERASEBKGND and the WM_Paint message. ---------------------------------------------------------------------- Drakon · 2010-01-30 01:09 hello, everyone, the real problem was the theme when I started using the normal theme, then the problems are over. Thanks to everyone who helped me when the response to Zaher, unfortunately my application works well with images then it does not like me to give it up, but the background color is the same label, I had already tried that.