More on Vista FoxPro rendering issues.
February 12, 2007 •
I mentioned a while back that there’s a UI based bug in VFP 9.0 on Vista that occurs when you have Fixed dialog windows loaded as child windows inside of other windows which causes window drawing inconsistencies which look like this:
The issue is related to any window that has a fixed border and while it may render properly if you don’t move it manually or programmatically as soon as you move the window or programmatically resize it the rendering will show pixel breakup around the edges.
The problem can be traced to the BorderStyle property and if you change a form that has a problem to be set with a sizable border (BorderStyle=3) the problem goes away.
It turns out that you can use this trick to get around this in code as well by setting the original BorderStyle to 3 (no border) and then in the INIT of the form set it to your actual value:
*!* FORM’s Init event handler
DOEVENTS
this.BorderStyle = 2
This solved the issue for most of my forms that had issues.
However, I still have a couple of other forms that are progress indicators – they show popup windows that dynamically resize other windows to display progress bars or animations etc. In this situation even the trick above didn’t work and required adding the BorderStyle in the Resize code. At the beginning of the code I’d change the borderstyle to 3 and then at the end of the code back to whatever the original value was with some DOEVENTS in the middle. This too works around this issue but it's annoying:
THISFORM.oAnimationDialog.ResizeForm()
DOEVENTS
THISFORM.BorderStyle = 3
THISFORM.oAnimationDialog.StartAnimation()
DOEVENTS
THISFORM.BorderStyle = 2
THISFORM.GoOnline()
Menu Popup Rendering Bugs
There’s another visual Bug with VFP and Vista. This one has to do with menu popups not properly showing highlights. Basically highlight selections aren’t always clearing out when moving of a menu option and so you end up with menu that looks like mulitple selections have been made.
This also seem to happen in combo/dropdownlist box dropdowns which is even more annoying. I haven’t found a workaround for this one.
I sure hope Microsoft is going to fix these issues in SP2. While these are not critical failures of VFP, they are pretty annoying cosmetic bugs that make applications look very unprofessional. All of these issues are releated to VFP's internal rendering of controls I suspect since no other Windows applications - even ancient ones - are exhibiting these kinds of rendering inconsistencies.
Anybody running SP2 now and checked whether these rendering issues are addressed? I haven’t installed given the many problems people have run into with the SP2 CTP.
Doug Hennig
February 13, 2007