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?.....
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
|