Programación General > Visual Basic 6.0 e inferiores

 Ayuda Con Imagen De Fondo Transparente...

(1/1)

ltmp820:
Buenos Días;

   Estoy creando una imagen automáticamente en visual basic, dicha imagen se carga en una pagina web ASP. Quiero que la imagen tenga el fondo transparente al subir a la web, Es decir, que cuando se genere en visual basic lo haga con el fondo transparente.

Me podrán ayudar por favor…..Como hago el fondo transparente?
He probado mil cosas y el fondo siempre esta blanco.

Estoy usando un  PICTUREBOX

De ante mano mil gracias….

Atte.
Luis Muñoz

Makko:

--- Código: Text ---'Codigo Interezante para forzar transparencia en un form de manera muy sencilla y con transparencia graduable Private Declare Function GetWindowLong Lib "USER32" Alias "GetWindowLongA" _(ByVal hWnd As Long, ByVal nIndex As Long) As LongPrivate Declare Function SetWindowLong Lib "USER32" Alias "SetWindowLongA" _(ByVal hWnd As Long, ByVal nIndex As Long, _ByVal dwNewLong As Long) As LongPrivate Const GWL_STYLE = (-16)Private Const GWL_EXSTYLE = (-20)'Requires Windows 2000 or later:Private Const WS_EX_LAYERED = &H80000 Private Declare Function SetLayeredWindowAttributes Lib "USER32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As LongPrivate Const LWA_COLORKEY = &H1Private Const LWA_ALPHA = &H2 Public Sub MakeWindowTransparent(ByVal hWnd As Long, ByVal alphaAmount As Byte)Dim lStyle As LonglStyle = GetWindowLong(hWnd, GWL_EXSTYLE)lStyle = lStyle Or WS_EX_LAYEREDSetWindowLong hWnd, GWL_EXSTYLE, lStyleSetLayeredWindowAttributes hWnd, 0, alphaAmount, LWA_ALPHAEnd Sub 'La transparencia es graduable modificando el alphaamount en este caso esta en 150 mientras menor es este valor mas transparente se tornaPrivate Sub Form_Load()Call MakeWindowTransparent(Form1.hWnd, 150)End Sub  Solo tienes que realizar una busqueda antes de postear.

Navegación

[0] Índice de Mensajes

Ir a la versión completa