hola que tal...


Deseo Realizar un software con ventanas transparentes....y encontré este codigo que puse en un frm de basic 2008 y si me iso la ventana transparente..pero cuando traté de agregar controles como botones, labels, etc...a la hora de ejecucion simplemente se ve la ventana transparente pero sin los controles que he añadido...
¿como puedo solucionar este problema?.....
Se ke la propiedad opacyty y transparency key pueden hacer transparente la ventana..pero esta transparencia es diferente...les agradeeceria ke la vieran ustedes mismos pegando el codigo en un formulario....

a continuacion pongo el codigo del frm de la ventana transparente.....




Private Declare Function DwmIsCompositionEnabled Lib "dwmapi.dll" (ByRef en As Integer) As Integer
Private Declare Function DwmExtendFrameIntoClientArea Lib "dwmapi.dll" (ByVal hWnd As IntPtr, ByRef margins As MARGIN_STRUCT) As Integer
Public Structure MARGIN_STRUCT
Dim cxLeftWidth, cxRightWidth, cyTopHeight, cyBottomHeight As Integer

Sub New(ByVal x1 As Integer, ByVal x2 As Integer, ByVal y1 As Integer, ByVal y2 As Integer)
cxLeftWidth = x1
cxRightWidth = x2
cyTopHeight = y1
cyBottomHeight = y2
End Sub
End Structure

Sub New()
Me.BackColor = Drawing.Color.Black
Dim en As Integer
If System.Environment.OSVersion.Version.Major >= 6 Then
DwmIsCompositionEnabled(en)
If en > 0 Then
DwmExtendFrameIntoClientArea(Me.Handle, New MARGIN_STRUCT(-1, -1, -1, -1))
End If
End If
End Sub
Ya esta resuelto este tema.... thank a todos los Internautas de indetectables...un gran foro de hacking...




si alguien tiene el mismo problema...la solucion es una llamada a la incializacion de componentes en el sub del formulario, en mi caso.....


byte... Solucionado por Raul338.....


genomma
Responder

Volver a “VB/.NET”