hyonos,
If I understand the question, unlike VB, VFP controls don't have handles - they are really just bitmaps, not "windows". While VFP 7 & 8 are "Microsoft Accessibility" aware, you can't send or intercept windows messages to individual controls - they don't really exist!
DECLARE INTEGER GetWindowLong IN user32.DLL ;
INTEGER hWnd, INTEGER nIndex
DECLARE INTEGER GetActiveWindow IN user32
i have put a new method in the form "Makeirregular" and this is the code:
LPARAMETERS nHWND, nColor, nAction
*Constants for SetLayeredWindowAttributs
#DEFINE LWA_COLORKEY 1
#DEFINE LWA_ALPHA 2
*Constants for SetWindowLong and GetWindowLong
#DEFINE GWL_EXSTYLE -20
#DEFINE WS_EX_LAYERED 0x00080000
LOCAL lnFlags
*The form's window must be set to Layered, so that it is drawn
* in a separate layer.
do case
case nAction = 1 && Make Transparent
lnFlags = GetWindowLong(nHWND, GWL_EXSTYLE) &&Gets the existing flags from the window
*thisform.nFlags = lnFlags
lnFlags = BITOR(lnFlags, WS_EX_LAYERED) &&Appends the Layered flag to the existing ones
SetWindowLong(nHWND, GWL_EXSTYLE, lnFlags) &&Sets the new flags to the window
SetLayeredWindowAttributes(nHWND, nColor, 0, LWA_ALPHA)
case nAction = 2 && Make Opaque
SetWindowLong(nHWND, GWL_EXSTYLE, lnFlags) &&Sets the original flags to the window
SetLayeredWindowAttributes(nHWND, nColor, 0, 0)
endcase
for make irregular form i have put image on form picture property and in the init event i call:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.