Visual Basic - Frame transparente

Life is soft - evento anual de software empresarial
 
Vista:

Frame transparente

Publicado por Pako (4 intervenciones) el 24/06/2005 12:23:05
Hola a todos! Quisiera saber que hay que hacer para que un frame sea transparente. Gracias!
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 14
Ha aumentado 1 puesto en Visual Basic (en relación al último mes)
Gráfica de Visual Basic

RE:Frame transparente

Publicado por SuNcO (599 intervenciones) el 30/06/2005 01:30:47
Como "un frame transparente" ? No quieres decir "un formulario transparente" ?

Si es un formulario puedes usar este codigo :

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 crey As Byte, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_LAYERED = &H80000
Private Const LWA_ALPHA = &H2&

Private Sub Command1_Click()
Dim LEVEL As Byte
LEVEL = Nivel
Call SetWindowLong(Me.hwnd, GWL_EXSTYLE, GetWindowLong(Me.hwnd, GWL_EXSTYLE) Or WS_EX_LAYERED)

Call SetLayeredWindowAttributes(Me.hwnd, 0, LEVEL, LWA_ALPHA)

End Sub

El Nivel va desde 20 - 250
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar