English 中文(简体)
Delphi Form Painting Black Flash When Restoring
原标题:

When I minimize and restore my Delphi application, the window contents flash a horrible black before (re)painting on Vista/Win7. This can also be seen with the Delphi 2007 IDE - the Object Inspector, Project Manager, Messages window (but not the editor contents) also flash black when restoring.

None of the ususal flicker-free painting techniques seem to make any difference, and some even make it worse: DoubleBuffered, WS_EX_COMPOSITED, WM_ERASEBKGND, etc.

Most Microsoft applications do not exhibit this behavior. Is this a problem with Delphi s implementation of Windows forms? Does anyone know of a workaround?

问题回答

When you register your window class, set hbrBackground to (HBRUSH)(COLOR_3DFACE + 1)

I would check that you have current video drivers and review all the settings. I have never seen the effect you describe on these OS, either with Delphi or my own apps; and if it was a widespread problem I feel sure that the Embarcadero newsgroups would be full of it.

I have D2007 and D2010 on two machines (Win7 64-bit laptop and Vista 32-bit desktop), and don t have this problem on either of them in either the IDEs or my applications.

Do you have theme support/Aero enabled? What video card and drivers? Are you using the classic appearance in Windows?





相关问题
determining the character set to use

my delphi 2009 app has a basic translation system that uses GNUGetText. i had used some win API calls to prepare the fonts. i thought it was working correctly until recently when someone from Malta ...

Help with strange Delphi 5 IDE problems

Ok, I m going nuts here. For the last (almost) four years, I ve been putting up with some extremely bad behavior from my Delphi 5 IDE. Problems include: Seemingly random errors in coride50.bpl ...

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How convert string to integer in Oxygene

In Delphi, there is a function StrToInt() that converts a string to an integer value; there is also IntToStr(), which does the reverse. These functions doesn t appear to be part of Oxygene, and I can ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签