Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transparent form
Message
 
To
17/11/2005 23:30:23
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01070076
Message ID:
01070108
Views:
13
>How to make vfp form transparent?
>
>I already saw the sample ship with vfp9, but it does not explain well enough.
>
>
>Thank.

Transperancy of the form will run only in Win2K ro later. You can't set transperancy in Win98, NT or ME.
Here how you can set it (stolen from Solution Samples :o)))
*** Form Init Event

#define BADOS_LOC    "This sample only runs on Windows 2000 or higher."
#define FORM_OPAQUE          255 
#define FORM_FULLTRANSPERANT 0
#define FORM_HALFTRANSPERANT 127 && Almost half :o)

IF VAL(OS(3))<5
    MESSAGEBOX(BADOS_LOC)
    RETURN .F.
ENDIF
DECLARE SetWindowLong              In Win32Api AS _Sol_SetWindowLong Integer, Integer, Integer
DECLARE SetLayeredWindowAttributes In Win32Api AS _Sol_SetLayeredWindowAttributes Integer, String, Integer, Integer

_Sol_SetWindowLong(THISFORM.hWnd, -20, 0x00080000)
_Sol_SetLayeredWindowAttributes(THISFORM.hWnd, 0, FORM_OPAQUE, 2)  && Opaque form

*** or
_Sol_SetLayeredWindowAttributes(THISFORM.hWnd, 0, FORM_FULLTRANSPERANT, 2)  && Full Transperant form

*** or
_Sol_SetLayeredWindowAttributes(THISFORM.hWnd, 0, FORM_HALFTRANSPERANT, 2)
If you run the Solution Sample Example you will see how these functions are used in Change Event of Slider control (Olecontrol1).
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform