I was working on my first VFP 9 app using Vista this week, and I had some forms that just refused to appear correctly. Specifically, the form’s Title Bar and Border would just disappear.
Looks like I’m not alone in this, as Rick Strahl wrote on his blog.
This seemed to only happen with Aero turned on, and with ‘fixed’ BorderStyle’s on my forms.
My workaround was to make the form BorderStyle=3 (Sizable), and set the MaxHeight, MinHeight, MaxWidth and MinWidth properties to the form’s Height and Width.
Problem solved!
Except for one thing. Now the user will see the ‘resize’ cursor when they hover over a border. They can try all they want to resize, but they can’t (thanks to the Max and Min settings).
I tried leaving the BorderStyle as 2, then adding code to my form’s INIT() to check the OS version and change the properties on-the-fly, but it was a no-go, so until VFP9SP2 I’m going to stick with this method for now.
This post originally appeared on the Foxite Weblogs site.