bueno es que DrakoX posteo un code :
CitarConst 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
este code solo afecta el color blanco y esto igual genera incomodidad al momento de trabajar, ya que la mayoria de las imagenes tienen el color blanco y quedan transparentes xD. Y esta es mi pregunta como puedo que afecte otro color menos utilizado como el &H00FFC0FF& ?
esup
Bye y sorry por colocar vambiar jajaja es cambiar xD
jaja,
yo este code no lo he posteado :P jeje,
pero de todas formas se como ayudarte,
el code debe quedar así:
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 = &HFFC0FF
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
con esto ya alcanza,
pero me imagino que sabes que debes cambiar el color del form
salu2
de nuevo gracias
Bye no te molesto mas xD ::)
jeje,
no me molestas,
todo lo contrario,
me divierto ayudando jeje ;D
salu2 y suerte
Si, es mio... weno da igual y como dije hay q cambiar esta linea:
CLR = RGB(255, 255, 255)
Ahí pones el color q kieras
1S4ludo