elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: AIO elhacker.NET 2021 Compilación herramientas análisis y desinfección malware


  Mostrar Temas
Páginas: 1 2 3 [4]
31  Programación / .NET (C#, VB.NET, ASP) / [SOLUCIONADO]Transparencia de Ventanas usando visual basic 2008 NET en: 25 Junio 2009, 01:22 am
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
Páginas: 1 2 3 [4]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines