PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 25 → WD - Como fazer uma janela transparente WINDEV?
WD - Como fazer uma janela transparente WINDEV?
Iniciado por BOLLER ADRIANO, jul., 02 2016 5:58 AM - Sem resposta
Membro registado
3.657 mensagems
Popularité : +175 (223 votes)
Publicado em julho, 02 2016 - 5:58 AM
/Rendre une fenêtre WinDev transparente nommé MaFenêtre.
//Affectation d`une valeur exemple
n est un entier = 150
SI n<0 OU n>255 ALORS
Erreur("Le taux de remplissage doit être compris entre 0 et 255.")
RETOUR
FIN
GWL_EXSTYLE est un entier = -20
WS_EX_LAYERED est un entier = 0x80000
LWA_ALPHA est un entier = 2

// Récupération du style actuel de la fenêtre
nStyleActuel est un entier = AppelDLL32("USER32.DLL", "GetWindowLongA", Handle(MaFenêtre), n)

// Application du taux de remplissage
AppelDLL32("USER32.DLL", "SetWindowLongA", Handle(MaFenêtre), GWL_EXSTYLE, nStyleActuel + WS_EX_LAYERED)

//Effet de transparence
AppelDLL32("USER32.DLL", "SetLayeredWindowAttributes", Handle(MaFenêtre),0, n, LWA_ALPHA)

Note : Depuis Windev, il existe une option permettant de regler l`opacitee d`une fenetre directement DANS sa Description.


--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/