Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sub form's shadow effect using shape object
Message
From
19/06/2006 22:26:23
 
 
To
19/06/2006 21:50:24
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01129983
Message ID:
01130132
Views:
19
>Thanks Herman. The whole Windows API stuff is a bit beyond me. Just curious...does the shadow disappear for you when you stop dragging the form?

Hi Mike,

I just tried shadowing the form then drag the form around. The shadow does not disappear.
BTW, this API function is fairly easy. Try this from command window:
Declare Long GetClassLong in User32 Long nhWnd, Integer nIndex
Declare Long SetClassLong in User32 ;
   Long nhWnd, Integer nIndex, Long dwNewLong

nDefaultStyle = GetClassLong( _VFP.hWnd, -26 )
SetClassLong( _VFP.hWnd, -26, BitOr( nDefaultStyle, 0x20000 ))
It will turn on the shadow for any VFP top-level form that has a same Class name (I think). For testing:
- Create a blank form, set ShowWindow = 2 - As Top-Level Form
- Run it
- Close the form then re-run it, see whether the shadow still in effect

To turn off the shadow you just need to reset the class style to the default value
SetClassLong( _VFP.hWnd, -26, nDefaultStyle )
Regards
Herman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform