Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
984 connectés 

  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  l'api AnimateWindow en vb6

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

l'api AnimateWindow en vb6

n°798981
fils_de_la​_lumiere
Posté le 18-07-2004 à 19:22:02  profilanswer
 

Bonjour,
 
Quelqu'un sait t'il comment utiliser l'api AnimateWindow en vb6 sur une form en mode borderstyle=none car ça ne semble pas fonctionner lorsque cette propriété est sur none ou connaissez vous une api qui permet l'ouverture en fondu d'une form comme le permet AnimateWindow.
 
;)

mood
Publicité
Posté le 18-07-2004 à 19:22:02  profilanswer
 

n°799901
fils_de_la​_lumiere
Posté le 19-07-2004 à 19:12:52  profilanswer
 

up

n°800616
fils_de_la​_lumiere
Posté le 20-07-2004 à 13:13:48  profilanswer
 

Personne n'a la connaissance d'une telle API ou autre élément pouvant me permettre d'avoir cet effet de fondu à l'ouverture?

n°800830
prog1001
Posté le 20-07-2004 à 15:28:10  profilanswer
 

je peut te dire comment rendre ta forme transparente de 0% à 100% si tu veux ! mais un effet de fondu, je vois pas !
 
met ça dans un module et appelle la Sub :
 

Code :
  1. Option Explicit
  2. Global Const WS_EX_LAYERED = &H80000
  3. Global Const LWA_COLORKEY = &H1
  4. Global Const LWA_ALPHA = &H2
  5. Global Const GWL_EXSTYLE = (-20)
  6. Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Boolean
  7. Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
  8. Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
  9. Public Sub Trans(Stat As String, Fenêtre As Form, Optional ByVal Alpha As Byte = 255)
  10. Select Case UCase(Stat)
  11. Case "ON"
  12.     SetWindowLong Fenêtre.hWnd, GWL_EXSTYLE, GetWindowLong(Fenêtre.hWnd, GWL_EXSTYLE) Or WS_EX_LAYERED
  13.     SetLayeredWindowAttributes Fenêtre.hWnd, 0, Alpha, LWA_ALPHA
  14. Case "OFF"
  15.     SetWindowLong Fenêtre.hWnd, GWL_EXSTYLE, GetWindowLong(Fenêtre.hWnd, GWL_EXSTYLE) - WS_EX_LAYERED
  16. Case "SET"
  17.     SetLayeredWindowAttributes Fenêtre.hWnd, 0, Alpha, LWA_ALPHA
  18. End Select
  19. End Sub


 
et ça marche avec borderstyle=0
 
j'ai chopé ça sur vbfrance mais je sais plus ou !

n°801261
fils_de_la​_lumiere
Posté le 20-07-2004 à 21:10:07  profilanswer
 

merci à toi de m'avoir mis sur la voie ;)
 
http://www.vbfrance.com/code.aspx?ID=24621


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  l'api AnimateWindow en vb6

 

Sujets relatifs
[RESOLU] - [VB6] Obtenir le nombre de dimensions d'un tableau ?Problème vb6, lire dans le registre
[VB6] recuperer les infos d'une cellule Excel (ligne/colonne)[VB6] Aide sur cadrage d'une image
VB6 - Parcourir les menus d'un menu ...[VB6] Sub Main
[VB6] [WMI] Probleme de connection a un pc distantVB6 sendkeys et reprise du focus
InstallShield, VB6 et Access97[vb6] Implémenter une requete Sql
Plus de sujets relatifs à : l'api AnimateWindow en vb6


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR