creas un modulo q se llame MODTRANSPARENCIAS Y LE DAS ESTE CODIGO
- Option Explicit
- 'Declaración del Api SetLayeredWindowAttributes que establece _
- la transparencia al form
- Private Declare Function SetLayeredWindowAttributes Lib "USER32" _
- (ByVal hwnd As Long, _
- ByVal crKey As Long, _
- ByVal bAlpha As Byte, _
- ByVal dwFlags As Long) As Long
- 'Recupera el estilo de la ventana
- Private Declare Function GetWindowLong Lib "USER32" Alias "GetWindowLongA" _
- (ByVal hwnd As Long, _
- ByVal nIndex As Long) As Long
- 'Declaración del Api SetWindowLong necesaria para aplicar un estilo _
- al form antes de usar el Api SetLayeredWindowAttributes
- Private Declare Function SetWindowLong Lib "USER32" Alias "SetWindowLongA" _
- (ByVal hwnd As Long, _
- ByVal nIndex As Long, _
- ByVal dwNewLong As Long) As Long
- Private Const GWL_EXSTYLE = (-20)
- Private Const LWA_ALPHA = &H2
- Private Const WS_EX_LAYERED = &H80000
- 'Función para saber si formulario ya es transparente. _
- Se le pasa el Hwnd del formulario en cuestión
- Public Function Is_Transparent(ByVal hwnd As Long) As Boolean
- On Error Resume Next
- Dim msg As Long
- msg = GetWindowLong(hwnd, GWL_EXSTYLE)
- If (msg And WS_EX_LAYERED) = WS_EX_LAYERED Then
- Is_Transparent = True
- Else
- Is_Transparent = False
- End If
- If Err Then
- Is_Transparent = False
- End If
- End Function
- Public Function Aplicar_Transparencia(ByVal hwnd As Long, _
- Valor As Integer) As Long
- Dim msg As Long
- On Error Resume Next
- If Valor < 0 Or Valor > 255 Then
- Aplicar_Transparencia = 1
- Else
- msg = GetWindowLong(hwnd, GWL_EXSTYLE)
- msg = msg Or WS_EX_LAYERED
- SetWindowLong hwnd, GWL_EXSTYLE, msg
- 'Establece la transparencia
- SetLayeredWindowAttributes hwnd, 0, Valor, LWA_ALPHA
- Aplicar_Transparencia = 0
- End If
- If Err Then
- Aplicar_Transparencia = 2
- End If
- End Function
luego vas a form_load del frmmain y colocas esto
- Dim result As Long
- result = SetWindowLong(Richtxt.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT)
listo la consola ya es transparente...
pero PUMMM: EL PROBLEMA JAJA
a veces no aparece los textos en la consola.... tengo q hacerle click para q actualice... esto sucede con el primer dialogo... dps ya cuando lo actualizo haciendo click no vuelve a suceder hasta q paso de mapa o no hay nada escrito en la consola...
no se actualiza la consola es el problema....
EJEMPLO
Entro al juego y dice SEGURO ACTIVADO...
dps me hago click.... y no aparece "Ves a bla bla bla bla bla <PIRULINO> DIOS JAJAJ
entonces me hago otra vez click...
Ves a bla bla bla bla bla <PIRULINO> DIOS JAJAJ
Ves a bla bla bla bla bla <PIRULINO> DIOS JAJAJ
o hago click en consola y finalmente aparece el primer click que hice... esto sucede con cualkier texto ... el mismo procedimiento no deja este problema en un dx7....
bueno espero una respuesta logica a esto jajaja y una posible solucion jaja
saludos Fariseo





74![Aprendiz [7] Aprendiz [7]](./images/ranks/Rango12.gif)
