AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Remove Vista Aero Border

Ein Thema von astral2k5 · begonnen am 17. Feb 2007 · letzter Beitrag vom 17. Feb 2007
Thema geschlossen
astral2k5

Registriert seit: 14. Feb 2007
2 Beiträge
 
Delphi 7 Professional
 
#1

Remove Vista Aero Border

  Alt 17. Feb 2007, 10:35
Hi,

Sorry for posting in English.

I'm trying to remove the "big" border that Vista AERO and Basic Theme have around a window.

According to this blog post :
http://shellrevealed.com/blogs/shell...dow-frame.aspx

Zitat:
What's with the extra border?
You will notice in the anatomy picture above an extra iPaddedBorderWidth padding, that wasn't there in XP. That's the glass border (4 pixels by default), upon which the Aero look is based.
This metric is new and different from the pre-existing border metric (iBorderWidth, 1 pixel by default):

iBorderWidth is used in a lot of places other than the window frame, like splitter windows and many surprising places. So if we increased it, you would have seen extra fat splitters, and other undesirable effects.
Contrary to iBorderWidth, iPaddedBorderWidth affects both resizable (thick) and non-resizable (thin) frames (so it makes thin frames not-so-thin anymore, which was desired for glass).
In a nutshell:

thick frame padding = iBorderWidth + iPaddedBorderWidth
thin frame padding = 1 + iPaddedBorderWidth

So even in Aero, if you like thick borders but not for non-resizable windows, you can set the padded border to 0 and increase the "Active Window Border" instead; you'll get thick glass borders, but in less places (although you'll get the side effects of thick splitters, etc.).
So here is my question, how can I set padded border to 0 using Delphi or someway to remove the "extra" vista border?

Also, in the comments of the same blog post I've found this :

Zitat:
You can explicitely disable the glass frame for a given window with DwmSetWindowAttribute(DWMWA_NCRENDERING_POLICY) and DWMNCRP_DISABLED.
DwmSetWindowAttribute on MSDN comes with the example below :
http://msdn.microsoft.com/library/de...wattribute.asp

Code:
 HRESULT DisableNCRendering(HWND hwnd)

   HRESULT hr = S_OK;

   DWMNCRENDERINGPOLICY ncrp = DWMNCRP_DISABLED;

   // Disable non-client area rendering on window
   hr = DwmSetWindowAttribute(hwnd, DWMWA_NCRENDERING_POLICY, &ncrp, sizeof(ncrp));
   if (SUCCEEDED(hr))
   { 
      //do more stuff
   } 
   return hr;
}
Could this function remove the padding border ? or only the glass effect ?

Please let me know your ideas.

P.S. :
According to this MSDN page :
http://msdn2.microsoft.com/en-us/library/ms724506.aspx

NONCLIENTMETRICS struct has this new member :
int iPaddedBorderWidth;

Thanks.
 
Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#2

Re: Remove Vista Aero Border

  Alt 17. Feb 2007, 10:47
einmal geüngt - hier gehts weiter: http://www.delphipraxis.net/internal...=682064#682064

*** LOCKED ***
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
 
Thema geschlossen


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:44 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz