Visual Basic - guirey

Life is soft - evento anual de software empresarial
 
Vista:

guirey

Publicado por reinlado (2 intervenciones) el 16/02/2005 20:41:33
busco como poner el formulario transparente vb4 no tiene en la paleta de colores ese codigo, o propiedad
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

RE:guirey

Publicado por ignacio (35 intervenciones) el 16/02/2005 20:55:41
proba con esto:
En la seccion de declaraciones pone:
Const GWL_STYLE = (-16)
Const GWL_EXSTYLE = (-20)
Const WS_EX_TRANSPARENT = &H20&
Const SWP_FRAMECHANGED = &H20
Const SWP_NOMOVE = &H2
Const SWP_NOSIZE = &H1
Const SWP_SHOWME = SWP_FRAMECHANGED Or SWP_NOMOVE Or SWP_NOSIZE
Const HWND_NOTOPMOST = -2

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 GetWindowLong Lib \"User32\" _
Alias \"GetWindowLongA\" (ByVal hWnd As Long, ByVal lIndex As Long) As Long

Private Declare Function SetWindowPos Lib \"User32\" (ByVal hWnd As Long, ByVal hWndInsertAfter _
As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, _
ByVal wFlags As Long) As Long

Luego para que se haga transparente:

Call SetWindowLong(Me.hWnd, GWL_EXSTYLE, WS_EX_TRANSPARENT)
Call SetWindowPos(Me.hWnd, HWND_NOTOPMOST, 0&, 0&, 0&, 0&, SWP_SHOWME)
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