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

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  Tranparencia y movilidad
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Tranparencia y movilidad  (Leído 1,796 veces)
akss_wm

Desconectado Desconectado

Mensajes: 49


Ver Perfil
Tranparencia y movilidad
« en: 23 Diciembre 2006, 21:27 pm »

Hola, estuve viendo algunos programas que kedaban bastante bonitos..y keria consultarles como hacer esto.. por ejemplo como crear un programa con el fondo transparente.. Buske en toda las propiedades del form y no encontre, le pude un gif con fondo transparente..pero el fondo se ve blanco.. y por ultimo, Ya se kitar todos los bordes..  pero como hago para yo mover y arrastrar el programa haciendole click en cualkier parte del programa?
Saludos. ojalas me puedan ayudar =)


En línea

DrakoX

Desconectado Desconectado

Mensajes: 191



Ver Perfil
Re: Tranparencia y movilidad
« Respuesta #1 en: 23 Diciembre 2006, 22:32 pm »

en el foro hay un post sobre este tema:
http://foro.elhacker.net/index.php/topic,151423.0.html

y aqui hay un monton:
Aqui

salu2


« Última modificación: 23 Diciembre 2006, 22:44 pm por DrakoX » En línea

VirucKingX


Desconectado Desconectado

Mensajes: 541


VirucKingX


Ver Perfil
Re: Tranparencia y movilidad
« Respuesta #2 en: 24 Diciembre 2006, 05:24 am »

con respecto a tu segunda duda :

Citar
Option Explicit
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    ReleaseCapture
    SendMessage Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
End Sub

Bye
En línea



Bye
~~
Ex-Staff
*
Desconectado Desconectado

Mensajes: 2.981


Ver Perfil WWW
Re: Tranparencia y movilidad
« Respuesta #3 en: 24 Diciembre 2006, 13:15 pm »

Otra opcion para q kede 100% transparente es declarar un color como transparente. Mirate este code, mirra este code hace el blanco transparente:

Código:
Const LWA_COLORKEY = &H1
Const GWL_EXSTYLE = (-20)
Const WS_EX_LAYERED = &H80000

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.dll" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

Private Sub Form_Load()
Dim Ret As Long
Dim CLR As Long
CLR = RGB(255, 255, 255)
Ret = GetWindowLong(Me.hWnd, GWL_EXSTYLE)
Ret = Ret Or WS_EX_LAYERED
SetWindowLong Me.hWnd, GWL_EXSTYLE, Ret
SetLayeredWindowAttributes Me.hWnd, CLR, 0, LWA_COLORKEY
End Sub

La cosa es cambiar el color segun te interese a ti ;) creo recordar q era en la linea CLR = RGB(255, 255, 255)

1S4ludo
En línea

VirucKingX


Desconectado Desconectado

Mensajes: 541


VirucKingX


Ver Perfil
Re: Tranparencia y movilidad
« Respuesta #4 en: 24 Diciembre 2006, 14:54 pm »

Otra opcion para q kede 100% transparente es declarar un color como transparente. Mirate este code, mirra este code hace el blanco transparente:

Código:
Const LWA_COLORKEY = &H1
Const GWL_EXSTYLE = (-20)
Const WS_EX_LAYERED = &H80000

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.dll" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

Private Sub Form_Load()
Dim Ret As Long
Dim CLR As Long
CLR = RGB(255, 255, 255)
Ret = GetWindowLong(Me.hWnd, GWL_EXSTYLE)
Ret = Ret Or WS_EX_LAYERED
SetWindowLong Me.hWnd, GWL_EXSTYLE, Ret
SetLayeredWindowAttributes Me.hWnd, CLR, 0, LWA_COLORKEY
End Sub

La cosa es cambiar el color segun te interese a ti ;) creo recordar q era en la linea CLR = RGB(255, 255, 255)

1S4ludo

Gracias

con ese code se me ocurren cientos de ideas xD, en especial en la apariencia del form

vale por el regalo de navidad

Bye

En línea



Bye
akss_wm

Desconectado Desconectado

Mensajes: 49


Ver Perfil
Re: Tranparencia y movilidad
« Respuesta #5 en: 26 Diciembre 2006, 13:07 pm »

Gracias VirucKingX y EON.. todos los codigos kedaron excelentes!  .
Saludos! =)
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines