Soyez le premier à donner votre avis sur cette source.
Vue 7 421 fois - Téléchargée 833 fois
' le code Principale Option Explicit Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long 'Private Declare Function GetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long Public Const WS_EX_LAYERED = &H80000 Public Const LWA_ALPHA = &H2 Public Const GWL_EXSTYLE = (-20) Public Sub SetTransparency(lngHwnd As Long, intAlpha As Integer, Optional boolTopMost As Boolean = False) Dim lngWindowsStyle As Long If intAlpha = 255 Then lngWindowsStyle = GetWindowLong(lngHwnd, GWL_EXSTYLE) ' obtention du style lngWindowsStyle = lngWindowsStyle And Not WS_EX_LAYERED ' retire le style desirer SetWindowLong lngHwnd, GWL_EXSTYLE, lngWindowsStyle If boolTopMost Then SetPremierPlan lngHwnd, HWND_NOTOPMOST Else lngWindowsStyle = GetWindowLong(lngHwnd, GWL_EXSTYLE) ' obtention du style lngWindowsStyle = lngWindowsStyle Or WS_EX_LAYERED ' ajoute le style desirer SetWindowLong lngHwnd, GWL_EXSTYLE, lngWindowsStyle SetLayeredWindowAttributes lngHwnd, 0, intAlpha, LWA_ALPHA If boolTopMost Then SetPremierPlan lngHwnd, HWND_TOPMOST End If End Sub
3 mars 2004 à 03:49
Moi ce qui m'interesserait ca serait de rendre des MDI chirlds transparentes !.
Pourquoi ? car alors, on pourrait mettre une belle image de fond dans la MDI PARENT, et avec une legere transparence ca devrait etre beau comme tout d'apercevoir la picture de la MDI PARENT.
Voila, j'attends pas, je pense que j'aurais pas mon souhait.
;-)
6 avril 2003 à 22:50
Il marche d'enfer chez moi (XP)
3 févr. 2003 à 16:29
1 déc. 2002 à 18:43
20 juin 2002 à 16:57
A+
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.