Wiki Home

SP 2 problemwith Vistaand Borderstyle


Namespace: VFP
Please someone else try this. YAG and Doug Hennig thought this had been fixed in SP2 RTM but I am still seeing it. Based on some hints from Doug I think I finally have a repro:


1. Make sure Vista is running with Aero / transparency
2. Start VFP9, SP2 RTM, NOT run as Administrator
3. Create a .scx form with only the following property overrides:
a. Maxbutton = .F.
b. In the form Init():
this.BorderStyle = 2
this.AutoCenter = .T.
4. Launch 2 copies of the form and drag one over the other
5. Launch a copy of the form and click at the VERY LEFT SIDE of the red "X" close button at the upper right.


What I see:

Step 4: Parts of the topmost form are left on the titlebar and border of the underlying form.

Step 5: A strange square gray "X" box appears on top of the Vista rectangular red close icon, and you must click on it to actually close the form.


As far as I can tell, the key is changing Borderstyle to 2 in the Init(). We do this so the form is resizable "Borderstyle = 3 (default)" by default in design mode but not in runtime mode.

Yes, I can reproduce this. Setting BorderStyle to 2 in the Properties window works but setting it in Init or Load causes the problem. This makes sense: according to Calvin Hsia's blog ( http://blogs.msdn.com/calvin_hsia/archive/2007/04/27/fix-your-forms-to-paint-borders-correctly-under-vista-aero.aspx ), "Apparently, under Vista Aero (except as Administrator), the BorderStyle cannot be set after the Window has been created." So, this is likely something that can't be fixed in VFP because it appears to be a Vista issue. -- Doug Hennig

Where is this information in the VFP9 SP2 Help File?

Actually there is something that could be "fixed" in VFP: when in design mode, make the form resizable regardless of the Borderstyle setting.
---
Category Vista Category Windows OS
( Topic last updated: 2007.10.27 05:33:49 PM )