Welcome to MSDN Blogs Sign in | Join | Help

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…

Published Wednesday, May 02, 2007 11:21 AM by Calvin_Hsia

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Fun with Vista Aero using the DwmExtendFrameIntoClientArea

Wednesday, May 02, 2007 9:09 PM by rstrahl

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>...

# VFP9 SP2 / SEDNA USEFUL LINKS

Saturday, August 11, 2007 12:12 AM by Cesar Chalom

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

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker