I am using Vista, 7 Aero glass in my app. I am able to apply it using the
DwmExtendFrameIntoClientArea API, but there is a minor problem, the text on
controls appears transparent. someone suggested me that I should use
SetLayeredWindowAttributes Me.hWnd, 0, 0, LWA_COLORKEY
it works, now the text is no longer transparent but this creates another
problem. I can no longer click on the form, the mouse events gets passed
through.
anyone have a fix for this?
Thanks in advance.
' here is the code.
' a form with a command button and this code
Option Explicit
Private Const LWA_COLORKEY As Long = &H1
Private Const GWL_EXSTYLE As Long = (-20)
Private Const WS_EX_LAYERED As Long = &H80000
Private Const WS_EX_TRANSPARENT As Long = &H20&
Private Const LWA_ALPHA As Long = &H2&
Private Type tRect
m_Left As Long
m_Right As Long
m_Top As Long
m_Buttom As Long
End Type
Private Declare Function apiApplyGlass Lib "dwmapi.dll" Alias _
"DwmExtendFrameIntoClientArea" (ByVal hWnd As Long, rect As tRect) As
Long
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 crey As Byte, ByVal bAlpha As Byte, ByVal dwflags As Long)
As Long
Public Sub ApplyTransparency()
Dim lOldStyle As Long
lOldStyle = GetWindowLong(hWnd, GWL_EXSTYLE)
SetWindowLong hWnd, GWL_EXSTYLE, lOldStyle Or WS_EX_LAYERED
SetLayeredWindowAttributes Me.hWnd, 0, 0, LWA_COLORKEY
End Sub
Private Sub ApplyAero()
Dim GRect As tRect
Dim lngReturn As Long
GRect.m_Buttom = -1
GRect.m_Left = -1
GRect.m_Right = -1
GRect.m_Top = -1
lngReturn = apiApplyGlass(Me.hWnd, GRect)
End Sub
Private Sub Command1_Click()
Me.BackColor = vbBlack
Call ApplyTransparency
Call ApplyAero
End Sub
Yes, it is, actually. If the text is black.
> but this creates another
> problem. I can no longer click on the form, the mouse events gets passed
> through.
>
> anyone have a fix for this?
Well, I don't have that issue if use LWA_ALPHA instead.
--
.NET: It's About Trust!
http://vfred.mvps.org
The whole form goes invisible.
The problem is I cant click anywhere on the form, on any control it is ok
but not on form. the mouse events pass though and instead the click goes to
the desktop or any windows behind the form. I hope you are getting what I am
trying to say.
the effect is same as described here http://support.microsoft.com/kb/249341
for making translucent window.
"Karl E. Peterson" <ka...@exmvps.org> wrote in message
news:i68vf1$dok$1...@news.eternal-september.org...
Yeah, I get it. Not sure what the answer is, though. What's the
purpose of having a "sheet of glass" for a form and it's controls,
anyway? To me, that'd be something you'd toggle on if you wanted to go
into some sort of stealth mode. IOW, it seems like it's working as
intended. I'd definitely have to read more about this function to have
any good suggestions. Sorry...
To make my app look good, nothing more. but as of now I am forced to use my
own controls instead of other controls.
my aim is to use aero glass which causes problem with Control Text.
| To me, that'd be something you'd toggle on if you wanted to go
| into some sort of stealth mode. IOW, it seems like it's working as
| intended.
the events should only pass though when we use
SetWindowLong Me.hwnd, GWL_EXSTYLE, lOldStyle Or WS_EX_LAYERED Or
WS_EX_TRANSPARENT
Instead of
SetWindowLong Me.hwnd, GWL_EXSTYLE, lOldStyle Or WS_EX_LAYERED
but I didn't use WS_EX_TRANSPARENT, then why its happening.
Have you seen other apps take this approach?
DwmExtendFrameIntoClientArea is simple, we pass a rect and it will make it
glass, if we pass -1 in rect then whole window will be glass.
"Karl E. Peterson" <ka...@exmvps.org> wrote in message
news:i697nk$i37$1...@news.eternal-september.org...
I didn't ask because I didn't think it was possible. I tried your
code, and it "worked", more or less. I asked because I wonder if it's
intended to *really* work, all the way? I've never seen another app do
this, so I was wondering if you were just experimenting. IOW, are you
trying to replicate something you feel ought to work, or something
you've actually *seen* working?
Want to try out the app?
"Karl E. Peterson" <ka...@exmvps.org> wrote in message
news:i69ag1$c38$1...@news.eternal-september.org...
I have some code in another language that might work. It's documentation
says the following:
"FIrst of all, any call to a glass function must only happen if the desktop
composition is enabled. The DWM API to query this is
DwmIsCompositionEnabled, and of course this call can only be made if the DWM
is present.
One of the great glass features is the ability to extend the effect beyond
the nonclient area and into the main area of your form. To achieve this,
first call the SwmExtendFrameIntoClientArea telling it how far you would
like the margins brought in, then make sure that when you pain t the
background of your form you draw a black region behind the glass areas.
There isn't much point in bringing the glass into your form unless you're
also going to put something ont op fo it. Luckily GDI+ is fully
alpha-channel aware so you can draw a high quality image onto your form
surface and all its alpha information will be respected. Text, however is a
little more complicated. To draw text you should use the DrawTextThemeEx
API which is a little tricky and requires that you use a memory DC with a
top-down DIB section."
Post not spell checked. <g>
Actually when I run your code at this end I get the Aeorglass effect over
the entire Form when I comment out the SetLayeredWindowAttributes line, but
when I include that line the entire client area of the Form goes solid black
and is also click through. I've tried various modifications and I cannot get
the effect you are after (at least the effect I think you are after). You
obviously already know that you can exclude a specific rectangle of your
Form from the Aeroglass effect because you have already mentioned the
Margins structure that is associated with DwmExtendFrameIntoClientArea, but
of course that allows just one rectangle to be excluded, whereas I assume
you want more than one rectangle to be excluded so that those rectangles can
contain various controls. Also, I'm not sure whether you want the various
Controls on your Form to themselves be "Aeroglass" and only their text shown
solid. If that is the case then I have not been able to come up with
anything that will do it. However if you want the entire Form to be
Aeroglass and some or all of the various VB controls (Command Buttons,
TextBoxes etc) on the Form to be totally solid (the control and its text
solid, with the Aeroglass Form client area around it) then I can think of a
way of achieving that effect. It's a bit of a "kludge", but it should
definitely work okay. It's pointless posting details at the moment though
because it might not actually be the effect you are after, but post again if
it might be suitable for your needs.
Mike
Other answers have alluded to this, but to get controls/text to draw
correctly to a glass area, you need to use GDI+ (or another fully alpha
aware library).
Plain GDI (As used by VB and most Win32 controls) does not support the
alpha.
When I last read up on it, black is treated as fully transparent (due to
the 0 value) and so shows up as clear on the glass.
There are various detailed articles on this if you have a look around
online (don't look for VB6 specific stuff)
--
Dee Earley (dee.e...@icode.co.uk)
i-Catcher Development Team
iCode Systems
(Replies direct to my email address will be ignored.
Please reply to the group.)
*What I don't want*
when I use aero on my form, text on controls becomes transparent. I want
text on controls like command button, textboxes to be black (opaque not
transparent) not only vb control but all other controls having 'black' as
text.
*How it Works*
We pass a rect to the aero DwmExtendFrameIntoClientArea, and set the
background color to black and it will make any black area into glass,
passing -1 will make the whole form glass.
Someone suggested me that I should use SetLayeredWindowAttributes Me.hWnd,
0, 0, LWA_COLORKEY to not messup the control text. but it creates another
problem that I cant click on the form.
thanks,
"Mike Williams" <Mi...@WhiskyAndCoke.com> wrote in message
news:i6akc1$e9h$1...@speranza.aioe.org...
> *How it Works* We pass a rect to the aero
> DwmExtendFrameIntoClientArea, and set the
> background color to black and it will make any
> black area into glass
That's not quite how I see it on my own system. According to the
documentation, the DwmExtendFrameIntoClientArea function actually uses a
MARGINS structure, rather than a RECT structure, with the values in the
MARGINS structure representing how far the four Aero glass Form borders
extend into the Form's client area, rather than the actual coordinates of a
rectangle. For example, if I specify 100 for each of the four entries in the
MARGINS structure then the Aero effect extends 100 pixels all around into
the client area, with whatever is left in the centre being a solid
rectangle. I suppose it amounts to almost the same thing though, and
certainly it appears possible to have only one solid rectangle on the Form,
whatever its size, which is not affected by the AeroGlass effect.
> passing -1 will make the whole form glass.
Yep. I get the same at this end. If all four border values are -1 and if the
whole Form is black then the whole Form will be true glass, but that's not
the same as saying "stuff on the Form that is not black will not be glass",
if that is what you are suggesting? I haven't used the Aero stuff before
but, on testing it on my own machine, any colour in the "glass" area that is
not black is simply treated as a "different shade of glass", depending on
its colour. So that means a TextBox background for example will be treated
as one shade of glass (depending on its background colour) and any text it
contains will also be treated as a different shade of glass, depending on
its text colour. From what I can see, every colour other than pure white is
treated as a particular shade and thickness of glass, with only pure white
being truly solid. In other words, regardless of the colours you choose for
the BackColor and ForeColor of a TextBox (for example) the text it contains
may become difficult or impossible to read depending on the colours of the
background your Form currently happens to be over.
> *What I don't want*
> when I use aero on my form, text on controls becomes
> transparent. I want text on controls like command button,
> textboxes to be black (opaque not transparent) not only
> vb control but all other controls having 'black' as text.
If you're asking what I think you are asking (a "glass" control on a "glass"
Form with some solid black text on the glass control) then I'm afraid I
don't know how to do it (except for a really bad kludge which would in any
case only partially solve the problem and only for static controls and which
really isn't worth doing), but I can think of a way (also a kludge really,
but it works) of having some Controls on an otherwise fully glass Form where
in each case BOTH the control AND the text it contains is totally solid and
opaque (not glass at all). That's the question I asked you in my previous
reponse (will a totally solid control with some totally solid text on it be
okay?), but you never answered it.
Mike
"Abhishek" <us...@server.com> wrote in message
news:i6ancv$kda$1...@speranza.aioe.org...
: *What I want*
:
:
"Kevin Provance" <k@p.c> wrote in message
news:i6b6d8$esq$1...@news.eternal-september.org...
Probably the only way your going to reliably get that using your
platform is to use owner drawn controls - you will have to do the
drawing using GDI+. VB6's form's engine is based on GDI - which as
been said a thousand times already in this thread is not alpha channel
aware.
--
Tom Shelton
Really? Are you really using GDI+ to paint your text? If so, let's see the
code you are using. I have dozens of GDI+ projects that simulate glass, and
tons of others things standard GDI could never do...so I do know it works.
You are not using GDI+ to draw your text or you wouldn't have this
issue. I hate to say, it - but for once Kevin is 100% correct.
If your going to draw on glass - forget about GDI.
--
Tom Shelton
Why do you hate to say it, Shelton? If it is true, which it is, then you
should be pleased to say it. Why do you hate the truth? You are in fact just
as power drunk and just as obnoxious and just as biased and just as
disgusting as your deranged and lunatic Micro$oft puppet masters.
Mike
now I can only think of two things
1. I am doing something wrong while applying glass
or
2. if I want glass I will have to make my own controls in GDI+.
"Tom Shelton" <tom_s...@comcast.invalid> wrote in message
news:i6be5v$hor$1...@news.eternal-september.org...
Nope.
> 2. if I want glass I will have to make my own controls in GDI+.
Bingo. And this is only a problem on platforms that use GDI for their
drawing.
--
Tom Shelton
> Well im not doing any text drawing on form, I know we can
> draw a text using drawthemetext apis. but I dont really want
> it. I just want controls to appear as they appear on a
> non-glass form.
Well that's the question I asked you, at least twice, and which you have
STILL not answered. The question, for the third time, was do you want a
Control (or a number of Controls) to appear on your glass Form as they
appear on a non glass Form, so both the Control and the text on it is solid.
I'm still waiting for the answer.
Mike
I think that's what he wants... A standard control that just works.
I'm wondering if you could use gdi+ to just draw a alpha aware bitmap
behind your controls? What do you think, Mike?
--
Tom Shelton
Let me clarify my thinking here a bit....
If he is properly doing glass, then he needs to be handling the WM_DW*
messages - which means he's already subclassing the form. I'm just
wondering if he could use that to draw an alpha aware bitmap on to the
client area under where his controls are...
Does taht make sense? I'm not much of a graphics, guy so I defer to
your greater skill in that area.
--
Tom Shelton
Here is code that will make your form transparent while not affecting
whatever controls are on it. You'll have to look up the APIs used. and
compensate for any word wrapping in this post.
Public Function ChangeAppearance()
Dim sngWidth As Single, sngHeight As Single, sngLeft As Single, sngTop
As Single
Dim varLeft As Variant, varTop As Variant
Dim intPos As Integer, lngNew As Long, lngIn As Long, lngOut As Long
'Set Form Height And Width To ScaleHeight And ScaleWidth
sngWidth = frmTrans.ScaleX(frmTrans.Width, vbTwips, vbPixels)
sngHeight = frmTrans.ScaleY(frmTrans.Height, vbTwips, vbPixels)
'Set default region
lngRegion = CreateRectRgn(0, 0, 0, 0)
'Measure our frame edges
sngLeft = (sngWidth - frmTrans.ScaleWidth) / 2
sngTop = sngHeight - sngLeft - frmTrans.ScaleHeight
lngOut = CreateRectRgn(0, 0, sngWidth, sngHeight)
'Get our frame, because we want to show a frame with this one
lngIn = CreateRectRgn(sngLeft, sngTop, sngWidth - sngLeft, sngHeight -
sngLeft)
'Combine our frame edge region with our frame region
CombineRgn lngRegion, lngOut, lngIn, RGN_DIFF
'Add our controls
For intPos = 0 To frmTrans.Controls.Count - 1
varLeft = frmTrans.ScaleX(frmTrans.Controls(intPos).Left,
frmTrans.ScaleMode, vbPixels) + sngLeft
varTop = frmTrans.ScaleX(frmTrans.Controls(intPos).Top,
frmTrans.ScaleMode, vbPixels) + sngTop
lngNew = CreateRectRgn(varLeft, varTop, varLeft +
frmTrans.ScaleX(frmTrans.Controls(intPos).Width, _
frmTrans.ScaleMode, vbPixels), _
varTop + frmTrans.ScaleY(frmTrans.Controls(intPos).Height,
frmTrans.ScaleMode, vbPixels))
CombineRgn lngRegion, lngNew, lngRegion, RGN_OR
Next
'Redraw the window
SetWindowRgn frmTrans.hwnd, lngRegion, True
End Function
Yep. That's what I thought as well, but he didn't answer my question and so
I didn't bother to post anything else.
> I'm wondering if you could use gdi+ to just draw a alpha aware
> bitmap behind your controls? What do you think, Mike?
Well to be perfectly honest, and as I have already indicated, you could
write everything I know about GDI+ on the back of a postage stamp! I just
don't use the stuff (although one day I think I'm going to have to look into
it, since it is apparently so useful). I don't know how he is handling his
glass effect other than the code he actually posted which uses a call to
DwmExtendFrameIntoClientArea specifying -1 for all four border extensions
which effectively turns the entire Form into what appears to be a sheet of
glass, and the problem he is having is that all the standard VB controls on
it, including any text they contain, are also rendered in a glass fashion,
which is apparently something he does not want.
As I said in my earlier responses, because of my lack of knowledge of GDI+
the only thing I can come up with out of my own head is a sort of "kludge"
in which his main Form is rendered as a solid sheet of glass (as he is
currently doing according to his posted code) but to not have any controls
on it at all. Then add a second Form and place all his desired controls on
that second Form, making the second Form totally transparent apart from the
specific areas in which the controls are situated. If he does this using
SetLayeredWindowAttributes with a COLORKEY then he will be able to easily
accommodate standard rectangular controls and also any other controls that
might have an irregular shape. He can then show the second Form with the
main Form as its owner and position it over the top of the main Form. A bit
of subclassing can then cause the second Form to exactly follow the main
Form whenever the user moves it, and a little more subclassing can send the
main Form a WM_NCACTIVATE True message whenever the user clicks into a
Control on the second Form, so as to prevent the main Form being drawn in
its "lost focus" colour. Like I said, its all a "kludge" really, but its the
only idea I can come up with at the moment which will not require me to read
a few manuals on GDI+ which is something I currently know nothing at all
about :-)
This is what I have got so far. It's all quite roughly coded, with many
Public variables etc in the module and with certain things not done in the
most efficient way, but that's because it is just a trial run to see if it
produces an effect anything at all like the effect the OP wants. There are
also a few things that need further attention (for example the fact that I
haven't yet added code to take into account the fact that the user might
reduce the size of the main Form, currently leaving one or more controls
"floating") but it does sort of do what I think the OP might want. There are
also other things that might need to be added. For example, I have not yet
included any code to allow the user to move the Form by clicking anywhere
other than in its caption bar area, which I think the OP might also want.
As I said, it's definitely a "kludge", but even if you don't like it you can
still have a lot of fun digging holes in it ;-) You need to create a
standard VB project with Form1 the startup object in the normal way and then
add a second Form and a Module. Place one Command Button and one TextBox on
Form2 and set Form2's Caption to empty and BorderStyle to None and
ShowInTaskBar to False. Then paste the following blocks of code into Form1
and into the Module (there is no code in Form2).
' *** START OF FORM1 CODE ***
Option Explicit
Private Declare Function apiApplyGlass Lib "dwmapi.dll" _
Alias "DwmExtendFrameIntoClientArea" (ByVal hwnd As Long, _
pMarInset As MARGINS) As Long
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 crey As Long, _
ByVal bAlpha As Byte, ByVal dwflags As Long) As Long
Private Const LWA_COLORKEY As Long = &H1&
Private Const GWL_EXSTYLE As Long = (-20&)
Private Const WS_EX_LAYERED As Long = &H80000
Private Const WS_EX_TRANSPARENT As Long = &H20&
Private Const LWA_ALPHA As Long = &H2&
Private Const GWL_HWNDPARENT As Long = (-8&)
Private Type MARGINS
cxLeftWidth As Long
cxRightWidth As Long
cyTopHeight As Long
cyBottomHeight As Long
End Type
Public Sub ApplyTransparency()
Dim lOldStyle As Long
lOldStyle = GetWindowLong(hwnd, GWL_EXSTYLE)
SetWindowLong hwnd, GWL_EXSTYLE, lOldStyle Or WS_EX_LAYERED
End Sub
Private Sub ApplyAero()
Dim GlassMargins As MARGINS
GlassMargins.cxLeftWidth = -1
GlassMargins.cxRightWidth = -1
GlassMargins.cyTopHeight = -1
GlassMargins.cyBottomHeight = -1
apiApplyGlass Me.hwnd, GlassMargins
End Sub
Private Sub Form_Load()
Dim nStyle As Long
With Me
.BackColor = vbBlack
.Show
ApplyTransparency
ApplyAero
.Hide
End With
With Form2
xOff = 120: yOff = 390 ' temporary, calculate properly later
.Move Me.Left + xOff, Me.Top + yOff, Me.Width, Me.Height
.BackColor = RGB(1, 1, 1)
nStyle = GetWindowLong(.hwnd, GWL_EXSTYLE) Or _
WS_EX_LAYERED
SetWindowLong .hwnd, GWL_EXSTYLE, nStyle
SetLayeredWindowAttributes .hwnd, .BackColor, 0&, LWA_COLORKEY
.Show , Me
End With
Me.Show
Me.SetFocus
oldWindowProcMain = SetWindowLongA(Me.hwnd, _
GWL_WindowProc, AddressOf WindowProcMain)
oldWindowProc1 = SetWindowLongA(Form2.Text1.hwnd, _
GWL_WindowProc, AddressOf WindowProc1)
oldWindowProc2 = SetWindowLongA(Form2.Command1.hwnd, _
GWL_WindowProc, AddressOf WindowProc2)
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, _
UnloadMode As Integer)
SetWindowLongA Me.hwnd, GWL_WindowProc, oldWindowProcMain
SetWindowLongA Form2.Text1.hwnd, GWL_WindowProc, oldWindowProc1
SetWindowLongA Form2.Command1.hwnd, GWL_WindowProc, oldWindowProc2
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Form2
End Sub
' *** END OF FORM1 CODE ***
'
'
' *** START OF MODULE1 CODE ***
Option Explicit
Public oldWindowProcMain As Long
Public oldWindowProc1 As Long
Public oldWindowProc2 As Long
Private Const WM_MOVE = &H3
Private Const WM_SIZE = &H5
Public Const GWL_WindowProc = (-4)
Public xOff As Long, yOff As Long
Public Declare Function SetWindowLongA Lib "user32.dll" _
(ByVal hwnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Declare Function CallWindowProcA Lib "user32.dll" _
(ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, _
ByVal Msg As Long, ByVal wParam As Long, _
ByVal lParam As Long) As Long
Public Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" (ByVal hwnd As Long, _
ByVal wMsg As Long, ByVal wParam As Long, _
lParam As Any) As Long
Public Const WM_NCACTIVATE = &H86
Public Const WM_LBUTTONDOWN = &H201
Public Function WindowProcMain(ByVal hwnd As Long, ByVal Msg As _
Long, ByVal wParam As Long, ByVal lParam As Long) As Long
If Msg = WM_MOVE Then
Form2.Move Form1.Left + xOff, Form1.Top + yOff
End If
WindowProcMain = CallWindowProcA(oldWindowProcMain, hwnd, Msg, _
wParam, lParam)
End Function
Public Function WindowProc1(ByVal hwnd As Long, ByVal Msg As _
Long, ByVal wParam As Long, ByVal lParam As Long) As Long
If Msg = WM_LBUTTONDOWN Then
SendMessage Form1.hwnd, WM_NCACTIVATE, -1&, ByVal 0&
End If
WindowProc1 = CallWindowProcA(oldWindowProc1, hwnd, Msg, _
wParam, lParam)
End Function
Public Function WindowProc2(ByVal hwnd As Long, ByVal Msg As _
Long, ByVal wParam As Long, ByVal lParam As Long) As Long
If Msg = WM_LBUTTONDOWN Then
SendMessage Form1.hwnd, WM_NCACTIVATE, -1&, ByVal 0&
End If
WindowProc2 = CallWindowProcA(oldWindowProc2, hwnd, Msg, _
wParam, lParam)
End Function
' *** END OF MODULE1 CODE ***
I think they'd be subject to the clipping area of the DC as they aren't
visible (maybe the CLIPCONTROLS window styel will help here?)
> This is what I have got so far. It's a kludge, and is all
> quite roughly coded, with many Public variables . . .
By the way, apart from the stuff I have deliberately not yet accounted for
in the code I posted there is one thing that I did mean to account for but
which I just forgot about, and that's the check for the mousedown on the
other buttons. I've checked only for the left button and so you'll need to
include checks for the right and middle buttons as well.
Mike
I think your right...
Actually, nobody's said it - but I think Kevin's use of a region is the
best way. Basically, a region the shape of the client with holes cut
out for the controls and then filled with the transparent color.
Aside from owner drawing the controls...
--
Tom Shelton
> Actually, nobody's said it - but I think Kevin's use of a region
> is the best way. Basically, a region the shape of the client with
> holes cut out for the controls and then filled with the transparent
> color. Aside from owner drawing the controls...
As far as I know, a Form with a GDI32 window region assigned to it
automatically displays itself as a sort of XP style Form, without any
Aeroglass effect, and so unless that problem was tackled the OP would not in
that way be able to achieve his desired "full sheet of Aeroglass with solid
Controls on it" effect. Unless of course there is a way of forcing a Form
with a GDI32 window region to display itself as an Aeroglass Form? Perhaps
it needs the equivalent of a GDI+ region, or perhaps there is some other way
of forcing Aero onto a Form with a GDI32 window region? I would be
interested in any answer you might be able to supply if you know how to do
any of those things? I did also try punching holes into a Form using the
alternative method of SetLayeredWindowAttributes with a COLORKEY (the same
method I used in the example I posted recently in which I made everything
but the "holes" transparent in Form2), and whilst that method of punching
holes in the Form did actually still allow the Form to be displayed with its
normal AeroGlass borders, it also produced similar problems to the problems
the OP was originally experiencing. Up to now the only method I've been able
to come up that works to achieve solid controls on a sheet of Aeroglass Form
(although it is admittedly a kludge, and an unfinished kludge at that!) is
the method I recently posted. If you come up with any other code that works
though then I'd appreciate it if you would post your solution.
Mike
I wasn't suggesting a gdi32 region - I was assuming using GDI+. I have
sample code for a different langauge on a different platfrom that uses
gdi+ for all it's rendering. And, to be honest I dont' want to go
through the pain of trying to convert it to use the gdi+ api in vb.
Kevin posted an example, which I admitedly hadn't tried or more then
skimmed - just to get a basic idea of it's function. I assumed he had
tried it, and based on his comments about having lots of experience
with gdi+ I assumed he was using the GDI+ api (which to be honest I've
never had to look at) - because it seemed to be following the basic
theme of the example I have in a different language.
I'm not knocking your suggestion at all - I admit that your knowledge
in this area is vastly superior to mine. And, it certainly is easier
then writting a bunch of owner drawn controls (though, that may
actually be the best long term solution since you can just reuse the
controls in other projects). I was simply trying to spark ideas -
based on the little experience I do have with glass on another
platform, and my past experience with VB.CLASSIC.
--
Tom Shelton
The sample I posted was just basic region clipping, using the standard GDI.
My experience with GDI+ is for my own apps where I needed more powerful
redrawing involving alpha channels. It also deals with animated gifs and
reading images from resource files (internal and DLL) with transparency.
I've not yet attempted the kind of clipping in my example with GDI+...but
it's an interesting challange. I'd like to say I have the time to mess with
it at present, but I don't.
That said, there is a guy who uses the handle LaVolpe on
planetsourcecode.com whose done some impressive things with GDI+. I would
suggest the OP look those example up and see if there is anything in there
he might find useful. He also has a GDI+ usage and sample section on
vbforums. I've not looked at it (yet), but might be another direction for
the OP: http://www.vbforums.com/showthread.php?p=3699398
Since I don't have a working install of VB6 on Vista or 7, I really
can't try this - and it would I think require using the gdi+ api. I
understand there is a typelib out there for this in VB6...
But, the steps would look something like this based on the code I have
in a different language:
1. create a gdi+ region that is the client area minus your controls.
2. call DwmExtendFraminIntoClientArea with the margins set all to 0
3. call DwmEnableBlurBehindWindow with the following values set:
dwFlags = DWM_BB_ENABLE Or DWM_BB_BLURREGION Or
DWM_BB_TRANSITIONONMAXIMIZED
fEnable = True
hRegionBlur = region handle
fTrasitionOnMaximized = false
Maybe?
--
Tom Shelton
Thanks... I had just gone back and looked and realized that was the the
case.
> My experience with GDI+ is for my own apps where I needed more powerful
> redrawing involving alpha channels. It also deals with animated gifs and
> reading images from resource files (internal and DLL) with transparency.
> I've not yet attempted the kind of clipping in my example with GDI+...but
> it's an interesting challange. I'd like to say I have the time to mess with
> it at present, but I don't.
>
That's cool. I don't really either - as I don't really have a working
vb6 install in vista or 7. I could do it on the xp vm and transfer
-but, it's too much work :)
But, I believe the basic idea is sound.
--
Tom Shelton
> Since I don't have a working install of VB6 on Vista or 7,
> I really can't try this - and it would I think require using the
> gdi+ api. I understand there is a typelib out there for this
> in VB6... But, the steps would look something like this
> based on the code I have in a different language:
>
> 1. create a gdi+ region that is the client area minus your controls.
Yep. That's pretty much what I would have expected, except of course (as I
stated previously) I know almost nothing about GDI+ and so I have not yet
tried that out.
> 2. call DwmExtendFraminIntoClientArea
> with the margins set all to 0
Well, actually setting all the margins to zero would not have any effect at
all as far as extending the Aeroglass borders into the client area of the
Form is concerned. You would need to set the margins all to -1 in order to
achieve a full Form sheet of Aeroglass as the OP requires.
> 3. call DwmEnableBlurBehindWindow with the following
> values set:
> dwFlags = DWM_BB_ENABLE Or DWM_BB_BLURREGION
> Or DWM_BB_TRANSITIONONMAXIMIZED
> fEnable = True
> hRegionBlur = region handle
> fTrasitionOnMaximized = false
Sounds reasonable, except of course using that method you then need to
actually draw all the controls. I was hoping that GDI+ might provide a
simpler way? Probably it does.
> Maybe?
Well, yeah. Maybe. One day I'm going to have to look into this GDI+
business, if I ever get the time of course ;-)
I was actually going to ask what you thought of the effect that the code I
posted myself achieved (the unfinished "kludge" using two forms) but since
you have said you don't have a working version of VB6 installed on Vista or
Win7 then I suppose you can't tell me. It does need some extra work to take
care of certain problems, but I think it is a reasonable start for an at
least workable solution that uses (mostly) straight GDI.
Mike
I know normally, that's the case - but, the example I have is actually
setting them to zero when using the region painting.
MARGINS(0, 0, 0, 0)
>> 3. call DwmEnableBlurBehindWindow with the following
>> values set:
>> dwFlags = DWM_BB_ENABLE Or DWM_BB_BLURREGION
>> Or DWM_BB_TRANSITIONONMAXIMIZED
>> fEnable = True
>> hRegionBlur = region handle
>> fTrasitionOnMaximized = false
>
> Sounds reasonable, except of course using that method you then need to
> actually draw all the controls. I was hoping that GDI+ might provide a
> simpler way? Probably it does.
>
Why would you have to draw the controls?...
The fact is the OP has to be subclassing the window if they are really
doing glass properly (looking for various WM_DWM* meessages).. So, why
couldn't they just do this when the main form gets a wm_paint message?
Then let the the controls draw themselves?
Basically, this should leave the areas covered by the controls
non-transparent, so you can't see through the text.
But like I said, this is not my area of expertise by anymeans - so,
this is a sincere question. The code I have draws a simple region,
maybe I'll put a control on it and subrtact it out and see what
happens...
--
Tom Shelton
Well, out of curiosity I took a peek at my "master" GDI= module. Turns out
thre are all kind of region API for GDI+, way more than standard GDI.
Specifically:
GdipCreateRegion or GdipCreateRegionRect
GdipCombineRegionRect or GdipCombineRegionRegion (seriously)
There are also RECTI equivs where the RECT data type are single values,
instead of longs.
I don't see a equivalent for SetWindowRgn, but that doesn't mean one isn't
in there someplace. All in all, I think with some work, the GDI example I
posted could be rewowrked for a GDI+ scenario...or something close.
Well see. If my plans fall through tonight, maybe ill mess with it. <g>
The example I have doens't actually call anythign like setwindowregion
- it passes the window hadnle and the region handle (via the
hRegionBlur member of the DW_BLURBEHIND struct) to
DwmEnableBlureBehindWindow....
--
Tom Shelton
Really? It doesn't seem that you "know" it judging from your responses so
far. In fact it seems as though (just like me) you know very little about
GDI+
> but, the example I have is actually setting them to zero
> when using the region painting.
Right. So it's not your own code then. That's probably why you don't
understand it.
> Why would you have to draw the controls?...
Well, from what you've explained so far when you said, and I quote, "1.
create a gdi+ region that is the client area minus your controls" I assumed
that you were creating a GDI+ region that excluded the control areas from
your Form entirely (made them totally transparent), in the same way that a
GDI32 "region of the Form with holes in it" would do. If that is the case
then (as in GDI32) the Controls that live in those "holes" would not be
drawn at all, because they are not included in the drawing region of the
Form. Are you suggesting that GDI+ window regions behave differently in that
respect, and that the Controls within them actually would be drawn, although
not in Aeroglass, with the rest of the Form that is not "in the holes" being
drawn in Aeroglass, or are you not sure what you are suggesting? Personally
I don't know the answer to that one myself, as I have previously indicated,
but it seems that you do. Are you actually sure about what you are saying?
It's interesting stuff this, Tom, and I would appreciate your valuable help
with it.
> But like I said, this is not my area of expertise by any means
So we're both in the same boat then as far as GDI+ is concerned?
> - so, this is a sincere question. The code I have draws a
> simple region, maybe I'll put a control on it and subrtact it
> out and see what happens...
That's not a question. It is a statement. But it is a very interesting
statement nonetheless. Maybe you would let me know what you discover. Sadly,
you will not be able to do it in VB6 (which is what the OP is using and
which is what he based his question on) because you have told me that you do
not have a working version of VB6 installed on either a Vista or a Win7
system. Are you now going to install one in order to perform your VB6 tests?
By the way, the original "bait" you slung, where you said to me, "I'm not
much of a graphics guy so I defer to your greater skill in that area" was
not very subtle. In fact it stood out a mile as soon as I read it. But the
fact is that I had already told you I know almost nothing about GDI+
graphics (although I do know something about GDI32 graphics), and the
(mostly) GDI32 code I wrote in an attempt to help the OP was a genuine
attempt to perform the required task without using GDI+. If you don't like
it (as I expect you won't because it was in response to the bait you slung)
then that's fine, but there really is no need to go to all this trouble in
your attempt to pull me into your net. Your methods are so transparent (pun
intended) that they are totally laughable :-)
In fact, your grasp of the principles of Psychiatry is almost as tenuous as
your grasp of the principles of GDI+
Mike
> Well see. If my plans fall through tonight, maybe ill mess with it. <g>
What plans? You're not going to mess with McCarthy or one of his
dopplegangers again are you ;-)
Mike
No, nothing so drab. A girl I know who is a...special friend is in town.
We're supposed to get together and....hang out. She hasn't called yet, but
her parent's are time hogs. After 8 pm EST, then i'll be worried. <g>
First of all, your correct, I don't know that much about gdi+ from an
api standpoint - i've never used the api directly. I've not had a
need.
I know a little about gdi - but not much, it's just not ever been
anything I've had to dive into in any real depth.
And what your are missing, is that I was trying to avoid the whole form
sheet of glass. The effect I was trying for, was to only fill the
exposed client areas, and leave the areas covered by controls alone.
In other words, create a complex region that excluded the control area
and then fill it with glass using the DwmEnableBlurBehindWindow api.
That's why the margins are 0...
>> but, the example I have is actually setting them to zero
>> when using the region painting.
>
> Right. So it's not your own code then. That's probably why you don't
> understand it.
>
I do understand it. I was just wondering if it would work in VB6. I
was hoping that Kevin would be able to try it out. But, if I can find
the gdi+ typelib, I might have time to try it myself tomorrow.
>> Why would you have to draw the controls?...
>
> Well, from what you've explained so far when you said, and I quote, "1.
> create a gdi+ region that is the client area minus your controls" I assumed
> that you were creating a GDI+ region that excluded the control areas from
> your Form entirely (made them totally transparent), in the same way that a
> GDI32 "region of the Form with holes in it" would do. If that is the case
> then (as in GDI32) the Controls that live in those "holes" would not be drawn
> at all, because they are not included in the drawing region of the Form. Are
> you suggesting that GDI+ window regions behave differently in that respect,
> and that the Controls within them actually would be drawn, although not in
> Aeroglass, with the rest of the Form that is not "in the holes" being drawn
> in Aeroglass, or are you not sure what you are suggesting? Personally I don't
> know the answer to that one myself, as I have previously indicated, but it
> seems that you do. Are you actually sure about what you are saying? It's
> interesting stuff this, Tom, and I would appreciate your valuable help with
> it.
>
Yes I'm quite sure what I'm saying. I think your the one that doesn't
understand what I'm saying.
In fact, I just altered the sample to just what I was saying, and yes
the control draws and still is clickable.
But, unfortunately, when I switch to gdi rendering for text - it's
still transparent, of course now it is the color of the form
background. So, I have little hope that my theory will work in VB6.
I guess that makes sense thinking about it. The whole thing is still
being put together by the dwm as a composite image.
>> But like I said, this is not my area of expertise by any means
>
> So we're both in the same boat then as far as GDI+ is concerned?
>
From an an api perspective that is true. But, I've done some work with
GDI+ indirectly. Not much, I've been playing around with a couple of
basic games.
>> - so, this is a sincere question. The code I have draws a
>> simple region, maybe I'll put a control on it and subrtact it
>> out and see what happens...
>
> That's not a question. It is a statement. But it is a very interesting
> statement nonetheless. Maybe you would let me know what you discover.
I have discovered that it doesn't work when gdi draws the text - as
explained above.
> Sadly,
> you will not be able to do it in VB6 (which is what the OP is using and which
> is what he based his question on) because you have told me that you do not
> have a working version of VB6 installed on either a Vista or a Win7 system.
> Are you now going to install one in order to perform your VB6 tests?
>
No. I could test it. I just need the api typelib. And I might if I
get time.
> By the way, the original "bait" you slung, where you said to me, "I'm not
> much of a graphics guy so I defer to your greater skill in that area" was not
> very subtle. In fact it stood out a mile as soon as I read it. But the fact
> is that I had already told you I know almost nothing about GDI+ graphics
> (although I do know something about GDI32 graphics), and the (mostly) GDI32
> code I wrote in an attempt to help the OP was a genuine attempt to perform
> the required task without using GDI+.
Ok... I wasn't discounting your attempt at all. And it maybe the only
way now that I've been doing a little experimenting. I was just
wondering if it might not be easier to do it a different way - that yes
involved a small amount of gdi+. Something that is supposed to be
useable from VB6...
> If you don't like it (as I expect you
> won't because it was in response to the bait you slung) then that's fine, but
> there really is no need to go to all this trouble in your attempt to pull me
> into your net. Your methods are so transparent (pun intended) that they are
> totally laughable :-)
>
You are completely wrong. I have not attempted anything, Mike. I was
not trying to bring anything other the vb6. for all you know is that
the example was in C++.
We have had issues Mike, but I do admire your graphics abilities. I
meant what as I said as a sincere complement...
--
Tom Shelton
I'm use a module with all the GDI+ declares (well, I don't know if *all* of
them are there, but it's comparable)
The typelib you are referring to, I think, is available at
vbaccelerator.com?
I check it out...
--
Tom Shelton
found it. bookmarked for retrieval if the wife lets me have anytime
tomorrow :)
--
Tom Shelton
> I was trying to avoid the whole form sheet of glass. The
> effect I was trying for, was to only fill the exposed client
> areas, and leave the areas covered by controls alone.
Right. I see what you were trying to do. That sort of thing of course is
very easy in VB6 if you just want your Form's visible client area (either
rectangular or irregularly shaped) to have a translucent background (either
a sheet of translucency of one or more colours or a translucent image or
something) and with your solidly drawn VB6 controls on top of it. It is not
so easy in VB6 though if you want a fancy Vista AeroGlass background, so
that the caption bar and borders and the client area effectively become a
single sheet of fancy semi animated Vista AeroGlass, and if you want solidly
drawn VB6 Controls on it, at least not easy with my own currently severely
limited amount of GDI+ knowledge ;-) If you ever get that effect working in
VB6 then let me know.
In fact that is why I went for the totally different approach (the kludge!)
of creating a full Form (caption bar, borders and client area) sheet of
fancy Vista AeroGlass with no controls on it at all, and then positioning an
owned second Form on top of it, with the second Form being totally
transparent except for the Control areas. It is very definitely a kludge,
and there is probably a very much better way to do it using the various GDI+
functions, but it is all I could come up with, at least without using GDI+
in the process (because of my current almost total lack of knowledge of
GDI+), and it does at least allow the OP to view the output and decide
whether that is actually the effect he wants (since his various statements
were sometimes not very clear and were sometimes at odds with each other).
Mike
If I have time, I do plan on trying it out latter. But, as I said
earlier, I don't think it's going to work anyway...
> In fact that is why I went for the totally different approach (the kludge!)
> of creating a full Form (caption bar, borders and client area) sheet of fancy
> Vista AeroGlass with no controls on it at all, and then positioning an owned
> second Form on top of it, with the second Form being totally transparent
> except for the Control areas. It is very definitely a kludge, and there is
> probably a very much better way to do it using the various GDI+ functions,
> but it is all I could come up with, at least without using GDI+ in the
> process (because of my current almost total lack of knowledge of GDI+), and
> it does at least allow the OP to view the output and decide whether that is
> actually the effect he wants (since his various statements were sometimes not
> very clear and were sometimes at odds with each other).
Your right - it is a kludge. But, that doesn't make it bad - in fact
it maybe the only viable solution for the OP to achieve the effect he
wants, short of creating a set of owner drawn controls. That would
probably be a lot more work then your "kludge". Sometimes, a kludge is
the best answer.
My experiementation failed - even when using a glass filled region; the
controls text became transparent when rendered using GDI (though, what
was showing through was the form background). Not only that to get the
full effect, you have to make the form borderless - and of course make
it draggable.
--
Tom Shelton
it works and thats exactly what I wanted.
only thing is when I click on any control form2 gets focus and main form1
get inactive. how to make form1 not lose focus?
Thanks,
"Mike Williams" <Mi...@WhiskyAndCoke.com> wrote in message
news:i6cjms$n0s$1...@speranza.aioe.org...
Did you set Form2's BorderStyle to None in the IDE? On my own Vista system
Form2 does actually get the focus when I click on a Control on it, but the
Form itself (other than its controls) is effectively invisible and the
WM_NCACTIVATE message I am sending to Form1 causes Form1 to retain the
/appearance/ of still having the focus. Is that what happens at your end
too? Does the main Form retain the appearance of having the focus, even
though Form 2 actually has it? If whatever you are doing causes that to
become a problem then perhaps there will be a workaround. As I said before,
the code I posted is just a kludge (and an unfinished kludge at that) to
check what effect you are actually after. It may be possible to take it
further to accommodate your specific requirements, or it may have
limitations that make it unworkable for the specific job you are doing and
you may have to do it the hard way, in which case some of the GDI+ people
here will probably be able to help you out.
Mike
"Mike Williams" <Mi...@WhiskyAndCoke.com> wrote in message
news:i6spb0$4tn$1...@speranza.aioe.org...
> Yes, I set the form2's borderstyle to None, but form1
> loses focus when I click anything on form2.
Looks like I'm going to have to repeat the question. here it is again . . .
. . . On my own Vista system Form2 does actually get the focus when I click
on a Control on it, but the Form itself (other than its controls) is
effectively invisible and the WM_NCACTIVATE message I am sending to Form1
causes Form1 to retain the /appearance/ of still having the focus. Is that
what happens at your end too? Does the main Form retain the appearance of
having the focus, even though Form 2 actually has it?
Mike
Yes, form2 gets focus and form2 is invisible except control (like we wanted)
| and the WM_NCACTIVATE message I am sending to Form1
| causes Form1 to retain the /appearance/ of still having the focus.
No, form2 gets focus and form1 loses. form1 is not retaining focus.
"Mike Williams" <Mi...@WhiskyAndCoke.com> wrote in message
news:i6tli0$4pj$1...@speranza.aioe.org...
> | and the WM_NCACTIVATE message I am sending to Form1
> | causes Form1 to retain the /appearance/ of still having the focus.
>
> No, form2 gets focus and form1 loses. form1 is not retaining focus.
Well I'm afraid I can't help you on that one because I cannot reproduce that
problem on my own machine (Vista Home Premium running either the Admin
Account or a Standard User Account). When I click one of the controls on the
otherwise invisible Form 2 then Form2 does /actually/ get the focus, but
Form1 /retains the appearance of having the focus/ and its overall
background colour stays the same.
If that is not what is happening on your own machine then it looks as though
for some reason the WM_NCATIVATE message is not working on your own machine.
Perhaps others here might like to run the code I posted and report what
happens on their own machines, to see if a pattern can be established?
By the way, you /are just clicking on those two controls in the original
test project/ are you? You haven't by any chance added some more controls of
you own and are clicking on those are you? If that is what you are doing
then Form1 will /not/ retain the appearance of still having the focus,
because only those two controls in the original test project (Command1 and
Text1) are currently subclassed. If you have added any other controls of
your own then you need to sublass them as well, or alternatively rewrite the
subclass so it is just a single function but so that it intercepts mouse
clicks over the entire form, regardless of which control the click is on.
Mike
Its working but partially, see the effect in taskbar.
form1 get the focus back but when we see in the taskbar it like form1 is not
in focus.
"Mike Williams" <Mi...@WhiskyAndCoke.com> wrote in message
news:i6tqq6$iph$1...@speranza.aioe.org...
>I am using Windows 7.
> Its working but partially, see the effect in taskbar.
> form1 get the focus back but when we see in the
> taskbar it like form1 is not in focus.
Sometimes it seems very hard to get accurate answers from you, Abishek. It's
almost as though you are just too busy to waste time typing fully detailed
answers to questions (although I suppose the language barrier might not
help). But I think I can see what you are saying now. From what you are now
saying, which is something different than what you said before, it appears
that Form1 itself does retain the appearance of having the focus (the main
body of Form1 on the screen retains its normal "has the focus" colour
instead of reverting to the "lost focus" colour) and it is only the Form's
icon (or whatever it is called) on the Windows taskbar that loses its focus
colour. Is that the case? If so then that is exactly what I am getting on my
own machine at this end, and exactly what I got when I originally wrote the
code, and it is why I originally said that "it needs some more work". I
haven't yet bothered looking at ways to stop the taskbar icon from losing
its normal focus appearance when a control on Form2 is clicked, and at the
moment I have no idea how to do it (the other part, concerning form
resizing, is easy and it is best not to waste time on that until the focus
on the taskbar problem has been tackled). I won't have time to do it tonight
though, and in fact even if I get the time to tackle it tomorrow I am not at
all convinced that I will be able to find a way to do it, but I'll give it a
go (if everything else other than form resize is currently working properly
at your end). At first I thought it might be possible to get the handle of
the Form's icon in the taskbar and send it an appropriate message, but a
quick test using WindowFromPoint shows that the entire part of the taskbar
which shows the Form's icons (or whatever they are called) is itself a
single window so it looks as though that method will not work. I think there
might be a different way of doing it though, although i can't think of
anything offhand. Also, I'll be away for most of the weekend so perhaps you
might like to post a supplementary question on the group and see if anyone
else here is prepared to tackle it.
Mike
|and it is only the Form's
| icon (or whatever it is called) on the Windows taskbar that loses its
focus
| colour. Is that the case?
yes, exactly.
I dont know but is this not the same way dockable windows are shown?
I will try applying aero to a MDI form, lets see.
take your own time, im in no hurry. whatever you can help is appreciated.
btw, here is my site www.abhisoft.net if you find any useful tools here,
then let me know, i will give you a free license.
Thanks,
abhishek
"Mike Williams" <Mi...@WhiskyAndCoke.com> wrote in message
news:i6tusg$tc3$1...@speranza.aioe.org...
> I dont know but is this not the same way dockable
> windows are shown? I will try applying aero to a
> MDI form, lets see.
The contained Form in an MDI setup does indeed not take the focus from the
main Form, but I don't know the details of the "cogs and pulleys" behind MDI
Form setups. It is certainly more than just owner and parent, because owner
and parent Forms do not behave in that way. I have actually tried applying
the "sheet of AeroGlass" stuff we've been using to an MDI Form though and I
cannot get it to work. The AeroGlass does in fact fill the main MDI
container Form, but there is a thin rectangular white line all around where
the inner border edges would otherwise be, spoiling the effect. Also, and
most importantly, whilst the contained Form does actually go invisible with
just its controls showing, those controls are not solid and they are drawn
in AeorGlass with the hard to read text and ill defined borders etc, so we
end up back where we started.
There may be some other way of tackling the loss of focus effect on the
TaskBar icon, but I haven't been able to figure it out yet. In fact, judging
by all the various things I have tried, I am beginning to think that is it
just not "doable". Every method that appears to solve one problem just
brings along some more problems of its own. I'll still keep having a go at
it from time to time though, and if I turn anything up I will let you know.
Let me know if you make any more headway than I have done with the MDI
setup.
Mike
today i was playing with the gadgets, and that gadgat windows seems to be
the only app with full glass.
Anyways, I gave up on this, just replying to say thanks.
"Mike Williams" <Mi...@WhiskyAndCoke.com> wrote in message
news:i6ves7$vbu$1...@speranza.aioe.org...
Out of interest I've just done the same thing in "that other place" and
produced a Full AeroGlass Form in the same manner. I had expected the
controls on the Form to be drawn solidly (since we are told that Controls in
"that other place" are fully Aero aware and that we would not have the same
problem there, but in fact I got exactly the same result in my "that other
place" project as I get in VB6, with the controls being glassed over and
virtually unusable. The only thing I've managed to come up with myself is
the kludge I posted, but the one problem I have not been able to overcome is
the fact that the main Form's taskbar icon clearly shows the loss of focus
when a control on the otherwise invisible Form2 is clicked.
Mike
In the other place, by default gdi is used to render the text. There
is a setting you need to set if you want it to work correctly. If your
interested, I'll respond to an email.
--
Tom Shelton
"Tom Shelton" <tom_s...@comcast.invalid> wrote in message
news:i7g4nq$hel$1...@news.eternal-september.org...