aero

FormBorderStyle.None removes the native open effect of windows 8

北城以北 提交于 2019-11-29 15:03:25
I like to have my form borderless in C#. So I used this code: FormBorderStyle = FormBorderStyle.None; But it removes the aero effect of windows 8. The form opens suddenly like a blink. How can i bring the aero effect back? Matin Lotfaliee I am answering my own question using the C++ reference I wrote a class inherited from Form Class. Each form in application should be inherited from this class instead of Form Class. public class AeroForm : Form { int _w = 100, _h = 100; bool aero = false; [StructLayout(LayoutKind.Sequential)] struct MARGINS { public int Left, Right, Top, Bottom; } [DllImport(

Disable aero fade-in effect on dialog

…衆ロ難τιáo~ 提交于 2019-11-29 14:39:45
I have a modal dialog I'm creating with MFC. When it appears, the Aero theme does it's fade-in transition for a new window appearing. In my particular case I'm switching immediately from one dialog to another and the fade effect is distracting. Is there a way it can be disabled so the window immediately appears, like it does when Aero is disabled, but without switching Aero off completely? casablanca The DwmSetWindowAttribute function might be able to help you. It lets you modify a number of window attributes related to the DWM. In particular, the DWMWA_TRANSITIONS_FORCEDISABLED attribute

WPF: Make window unresizeable, but keep the frame?

江枫思渺然 提交于 2019-11-29 14:08:11
问题 I have a window that does not have a title bar ( WindowStyle == WindowStyle.None ). The entire window uses the Aero glass effect. When I make the window unresizeable ( ResizeMode == ResizeMode.NoResize ), the glass effect disappears and my controls just hang in midair. (Essentially, the window itself disappears but leaves its contents.) Is there a way for me to make the window unresizeable without getting rid of the window frame? I have read the question Enable Vista glass effect on a

Changing the colour of Aero glass for my window?

試著忘記壹切 提交于 2019-11-29 14:04:08
问题 I'm using DwmExtendFrameIntoClientArea in my WPF application to get the glass effect. This is working fine. What I'd like to do is change the colour used for the glass -- I'm writing a countdown timer, and I'd like the window to be the normal glass colour most of the time, and then to go red (but still with glass) when the time runs out. I found this question, which talks about how to apply a gradient glass, and that works fine when picking a different colour. Unfortunately, the borders are

Change background color of disabled listbox in windows classic theme

不羁的心 提交于 2019-11-29 13:52:52
I am developing a WPF application that must run using Windows Classic theme. The application creates a dialog box containing a ListBox. When the dialog box is shown, it must be disabled for 1s before accepting any input. I am accomplishing this with a style trigger, and it works. However, the ListBox shows a white background when it's disabled, which I can't seem to get rid of. When using the aero theme, the following style resource fixes the issue: <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent"/> But when using Windows Classic theme, the white background

Get Aero Window Colour

余生长醉 提交于 2019-11-29 08:03:02
I've made a pretty slick Windows 8-ish interface using WPF. It already turns out way better than I could wish for, but I was wondering the following: Is it somehow possible to retrieve the current window colour set by the user? You know, you can set the Aero colour when you right-click the desktop... My plan is to use that colour for a couple of canvas elements on my GUI. Thanks in advance! You can query the ColorizationColor registry key for this. I've even went a step further and created a method to get the hexadecimal colour value, hope this helps you: public void SomeMethod() { int

Adding button to titlebar (like Firefox 4) in VB.NET & WPF or WinForms on XP or Vista/7

删除回忆录丶 提交于 2019-11-29 08:01:31
I was wondering if it is possible to add a button to the title bar in vb.net - I found a way to do this in one or the other but is it possible to do it on both? Here is the code that works if Aero is disabled (imports System.RunTime.InteropServices): Private Const WM_NCPAINT As Integer = 133 Private Const WM_NCMOUSEMOVE As Integer = 160 Private Const WM_NCLBUTTONDOWN As Integer = 161 Private Const WM_NCLBUTTONUP As Integer = 162 Private Const WM_NCLBUTTONDBLCLK As Integer = 163 Private Const WM_NCACTIVATE As Integer = 134 Private Const WM_NCMOUSELEAVE As Integer = 674 Private

How to achieve Vista glass transparency (AERO) in a WPF application?

五迷三道 提交于 2019-11-29 02:32:33
It's easy for a WPF application to make parts of a window transparent or semi-transparent. But how to I apply the current Vista theme (colors, opacity) to these transparent parts? When I have a green glass border how will I get a green glass background of the same style? Is it even possible to do this without calls to the Windows API? I am thinking of something like this Stefan Here's a nice example: CodeProject: Adding Glass Effect to WPF using Attached Properties Take a look at this link, look for the section titled "IE7 – Extending the glass frame": http://blogs.msdn.com/wpfsdk/archive/2008

Delphi support for Aero Glass and the DoubleBuffered property - what is going on and how do we use them?

狂风中的少年 提交于 2019-11-28 16:33:43
I am confused by Delphi 2009/2010 support for the Aero Theme Glass features in Windows, and by what, exactly DoubleBuffered means, and what it has to do with Aero glass. I have found that DoubleBuffered is not only a property in the VCL, it also is found in .net WinForms . Initially I wondered if it set some kind of window style bit used by the common controls library, or what. Why is it used, and when should it be used? [Update: I should state that I know what "double-buffering" is, as a general technique for reduction of flicker, what I wondered is, why does it have ANYTHING to do with

Disabling progress bar animation on Vista Aero

二次信任 提交于 2019-11-28 11:12:18
I'm using a Delphi 2009 VCL TProgressBar as a kind of "empty/full" gauge. On Vista, with Aero theme enabled, this has an animation associated with it, which is annoying and inappropriate for an gauge. Is there any way of disabling this (NOT by adjusting user's theme settings!) to prevent the animation on this control? To clarify, I want something basically identical to the 'disk space used' meters in Windows Explorer. No animation, but still with a nice border and shading effects. Update: I understand that I need a "meter", rather than a true progress bar. How can a themed meter be implemented