Transparency in a SubForm, How To??

C

cientocienreg

Hello Group, my doubt is the following:
I have a form frmCliente, i know how to do it transparent:

Private Const LWA_ALPHA = & H2
Private Const GWL_EXSTYLE = (-20)
Private 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" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As
Byte, ByVal dwFlags As Long) As Long
Private declare U apiRGB Lib "kernel32" Alias "RtlMoveMemory" (Ace Any
dest, src As Any, ByVal Length As Long)


The Load method of my form (frmCliente)

SetWindowLong hwnd, GWL_EXSTYLE, GetWindowLong (Me.hwnd, GWL_EXSTYLE)
Or WS_EX_LAYERED
SetLayeredWindowAttributes hwnd, 0, 190, LWA_ALPHA



And all goes well, when i open frmCliente has the level of
transparency that I would like, the problem is that this form
(frmCliente) is one of the subform of a main form (frmMain) and when i
open this (fmrMain) my subform (frmCliente )is not transparent. Why
this happens? ? How can I fix it? ?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top