(Related to Aero Glass)Can anyone solve problem with this project?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello.Do you know any solution for this problem.Let me explain about problem. I want to show buttons on Aero glass.So I used a trick,I creat two forms,one is BackForm and one is ForeForm.
BackForm extend Aero frame into client area.
ForeForm has no border,its BackColor and TransparentyKey set to systemcolors.ActiveCaption (so,its transparent!).
BackForm creates a Aero Background for ForeForm.
ForeForm provides controls for BackForm.
See this image of two forms:
http://www.up.iranblog.com/ <img src="http://www.up.iranblog.com/images/mah78934opqjrk4tpmrh.png" border="0" alt="سایت آپلود عکس و آپلود سنتر فایل ایران بلاگ
ForeForm transparencyKey and BackColor are SystemColors.Control.If I chnaged them to red,the forms transparent area answer to clicks!
I share you the source code of this project.If you help me,I can make a very easy and powerful Aero Form.
I cant share code of base Aero form and we dont need sourse of Aero form,too.
http://public.blu.livefilestore.com/y1pylcnqbEd6bUIpnnvuUaF2CN5IpIfXIyFR7YehWU9A1cVmO_MnaFm91vUXFRGrBI40DbVWbvEYAzrS6sA2W7bew/Two%20Floor%20Rendering%20Technology.zip?download&psid=1 <span style="color:#0066dd Download sourse code
http://cid-a3b59c8f345fb4bc.office.live.com/self.aspx/.Public/Two%20Floor%20Rendering%20Technology.zip <span style="color:#0066dd Download it by SkyDrive page
Sourse of WndProc in Aero Form:
<pre style="font-family:consolas <span style="color:green <span style="color:gray <summary><br/><span style="color:green Indicates which mode of drawing caption bar.<br/><span style="color:green <span style="color:gray </summary><br/><span style="color:blue Public <span style="color:blue Enum <span style="color:#2b91af CaptionBarStates<br/> AutoSet<br/> Active<br/><span style="color:blue End <span style="color:blue Enum[/code]
<pre style="font-family:consolas <span style="color:green <span style="color:gray <summary><br/> <span style="color:green Gets or sets mode of drawing caption bar (Force active).<br/> <span style="color:green <span style="color:gray </summary><br/> <<span style="color:#2b91af Description(<span style="color:#a31515 "Mode of drawing caption bar (Force active)."), <span style="color:#2b91af Category(<span style="color:#a31515 "Window Style"), <span style="color:#2b91af DefaultValue(<span style="color:blue GetType(<span style="color:#2b91af CaptionBarStates), <span style="color:#a31515 "AutoSet")><br/> <span style="color:blue Public <span style="color:blue Overridable <span style="color:blue Property CaptionBarRenderMode <span style="color:blue As <span style="color:#2b91af CaptionBarStates = <span style="color:#2b91af CaptionBarStates.AutoSet[/code]
<pre style="font-family:consolas <span style="color:blue Protected <span style="color:blue Overrides <span style="color:blue Sub WndProc(<span style="color:blue ByRef e <span style="color:blue As <span style="color:#2b91af Message)<br/> <span style="color:blue If e.Msg = <span style="color:#2b91af AeroAPIs.WM_NCACTIVATE <span style="color:blue Then<br/> <span style="color:blue If CaptionBarRenderMode = <span style="color:#2b91af CaptionBarStates.Active <span style="color:blue AndAlso e.WParam = <span style="color:blue False <span style="color:blue Then<br/> e.WParam = <span style="color:blue True<br/> <span style="color:blue End <span style="color:blue If<br/> <span style="color:blue End <span style="color:blue If<br/> <span style="color:blue MyBase.WndProc(e)[/code]
<pre style="font-family:consolas <pre style="font-family:consolas <span style="color:blue End <span style="color:blue Sub[/code]
[/code]
A little description:
I have a form.Its name is BackForm.
I have another form.Its name is ForeForm.
BackForm extend Aero frame into client area.
ForeForm has no border,its BackColor and TransparentyKey set to systemcolors.ActiveCaption (so,its transparent!).
BackForm creates a Aero Background for ForeForm.
ForeForm provides controls for BackForm.
Additional:Controls cant be on BackForm because Aero frame uses semi transparenty and controls doesnt render well.
<br/>

View the full article
 
Back
Top