Fun with Vista Aero using the DwmExtendFrameIntoClientArea


You can have a little fun with Vista Aero using the DwmExtendFrameIntoClientArea function.


 


This will cause the VFP border to paint the glass effect around the fox border


 


DECLARE integer DwmExtendFrameIntoClientArea  IN dwmapi integer hWnd, string  @ daMargins


 


cStr=REPLICATE(BINTOC(100,”4rs”),4)


_screen.BackColor=0


_screen.ForeColor=-1


DwmExtendFrameIntoClientArea (_vfp.HWnd, @cStr)


RETURN


 


 


 


 


For your own forms, try this:


 


 


 


 


PUBLIC x


x=CREATEOBJECT(“myForm”)


x.show


DEFINE CLASS MyForm  AS Form


      ShowWindow= 2     && top level form


      PROCEDURE Init


            DECLARE integer DwmExtendFrameIntoClientArea  IN dwmapi integer hWnd, string  @ daMargins


            cStr=REPLICATE(BINTOC(100,”4rs”),4)


            this.BackColor=0


            this.ForeColor=-1


            DwmExtendFrameIntoClientArea (this.HWnd, @cStr)


 


ENDDEFINE


 


 


 


 


 


 


For more fun, stay tuned…

Comments (2)

  1. rstrahl says:

    Cool. For some real interesting behavior try it with  non-top level form after running the desktop sample <s>…

    Not sure how useful this would be unless you create a window without any chrome at all (ie. borderless and no control box). Unfortunately then it seems you can’t paint ontop of what used to be the title bar. Interesting, but probably not all too useful <s>…

  2. Cesar Chalom says:

    Here are some of the links that I often visit regarding VFP9 SP2 and Sedna. The official Microsoft Visual…