Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formularios transparentes
Message
 
 
À
08/10/2003 09:20:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00836173
Message ID:
00836603
Vues:
22
Hola, Gustavo.

>Agradeceria altamente me pudieran suministrar via correo electrónico un formulario de Visual FoxPro 6.0 (.SCX .SCT) que tenga caracteristicas de transparencia, los que he conseguido son unicamente para Visual Basic.

Esto no depende tanto de la versión de VFP como del sistema operativo que utilices. Te paso aquí la parte involucrada en una de mis clases. Lo que hace este formulario es aparecer poco a poco.
*-------------------- Evento Init 
with thisform
   * Invisible
   .Fade( 0 )
   * Despliega (invisible)
   .Show()
   * Hace visible gradualmente
   .Fade( +1 )
endif

*--------------------- Evento Destroy 
with thisform
   * Si está visible
   If .Visible
      * Desaparece gradualmente antes de cerrarse
      .Fade( -1 )
   EndIf
endwith

*--------------------- Método Fade
Lparameters tnMode as Number && +1 fade in, -1 fade out, 0 invisible

With thisform
   
   * Si es Top-level y Win2000 en adelante
   If .ShowWindow = 2 and Val( Os(3) ) >= 5

      If Empty( tnMode )
         
         SetWindowLong( .hWnd, -20, 0x00080000 )
         SetLayeredWindowAttributes( .hWnd, 0, 0, 2 )
      Else
         Local lnOpacity, lnFrom, lnTo, lnStep
         lnFrom = Iif( tnMode > 0, 0, 255 )
         lnTo   = Iif( tnMode > 0, 255, 0 )
         lnStep = tnMode * 25
         
         * Fade IN/OUT
         for lnOpacity = lnFrom to lnTo step lnStep
            
            SetWindowLong( .hWnd, -20, 0x00080000 )
            SetLayeredWindowAttributes( .hWnd, 0, lnOpacity, 2 )
         Next

         SetWindowLong( .hWnd, -20, 0x00080000 )
         SetLayeredWindowAttributes( .hWnd, 0, lnTo, 2 )
      EndIf
   endif
endwith
El código está funcionando en VFP 7 y 8, pero básicamente debería funcionar en VFP 6 también, con algún cambio menor.

Espero que te sea útil,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform