Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make the form transparent??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00607266
Message ID:
00607737
Vues:
45
Hi,
In Windows 2000 and later you can use WinAPI function SetLayeredWindowAttributes :
#DEFINE GWL_EXSTYLE -20
#DEFINE WS_EX_LAYERED 524288
#DEFINE LWA_COLORKEY 1
#DEFINE LWA_ALPHA    2

DECLARE INTEGER FindWindow IN WIN32API STRING, STRING
DECLARE LONG GetWindowLong IN WIN32API INTEGER, INTEGER
DECLARE LONG SetWindowLong IN WIN32API INTEGER, INTEGER, LONG
DECLARE SetLayeredWindowAttributes IN WIN32API INTEGER, INTEGER, INTEGER, LONG

* Getting a window handle
hWnd = FindWindow(NULL, 'Microsoft Visual FoxPro')
attr = GetWindowLong(hWnd, GWL_EXSTYLE)
SetWindowLong(hWnd, GWL_EXSTYLE, attr + WS_EX_LAYERED)

* To make the whole window semi-transparent:
Alpha = 192    && 0-255, 0 - transparent
SetLayeredWindowAttributes(hWnd, 0, Alpha, LWA_ALPHA)

* To make a selected color transparent:
*Color = RGB(255,255,255)
*SetLayeredWindowAttributes(hWnd, Color, 0, LWA_COLORKEY)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform