aero

How to display a Windows 7 style context menu?

孤街醉人 提交于 2020-01-01 05:43:10
问题 In my .NET applications, context menus look like the left one. How can I apply the Windows 7 style on them in order to make them look like the right one? 回答1: Right-click the tool box, Choose Items. Tick "ContextMenu", the one with Namespace = System.Windows.Forms and Directory = Global Assembly Cache. This .NET 1.x component is distinct from ContextMenuStrip, it uses native Windows menus. You'll lose some capabilities, I doubt you care. You'll need to write a line of code to assign the menu,

WPF / Windows 7: Disable Default Progress Bar Glow Animation

*爱你&永不变心* 提交于 2019-12-31 22:31:47
问题 Quick WPF question - on Win 7 (and I assume Vista) in WPF, the default progress bar does a nice little glowing "whoosh"-y animation. I'm showing progress of about 48 things on one screen, and it's a tad overwhelming to have all of these things whooshing on you - can you disable just these animations without affecting the rest of the default animations in the application? 回答1: I'd agree with Matthew's comment, but anyway, your answer is to apply a custom style without the animation. Here's the

Drawing a TextBox in an extended Glass Frame w/o WPF

六月ゝ 毕业季﹏ 提交于 2019-12-31 05:48:11
问题 I am trying to draw a TextBox on the extended glass frame of my form. I won't describe this technique, it's well-known. Here's an example for those who haven't heard of it: http://www.danielmoth.com/Blog/Vista-Glass-In-C.aspx The thing is, it is complex to draw over this glass frame. Since black is considered to be the 0-alpha color, anything black disappears. There are apparently ways of countering this problem: drawing complex GDI+ shapes are not affected by this alpha-ness. For example,

How to draw the bitmap icon on title bar when Windows Aero theme is enabled

☆樱花仙子☆ 提交于 2019-12-31 02:56:11
问题 I'm developing a MFC application ( DWM library is not available ). I want to draw a bitmap functioning as a button on the title bar. However, the bitmap won't present when the Aero theme is enabled in Windows 7 (There are no problem when I disable the Aero theme). But my application still reactable by clicking on the position of the bitmap. Does anyone can teach me how to solve this problem? Thanks 回答1: Drawing custom data into the frame area with DWM is described on MSDN, also the hit

Windows Aero areas in own C# Applications

痴心易碎 提交于 2019-12-31 01:51:10
问题 I'm wondering about that many new applications, I think most built in WPF, has this really cool Windows Aero Glass interfaces. For example Seesmic or the upcoming Firefox 3.7 (source: crenk.com) Searching in the internet most time it looks like you need a hack to realize this. But seriously: I don't think big software development teams use hacks to roll out their huge used products. So my question is: Windows Aero Glass Areas - How to do? Is it only possible with a hack? Maybe it's just one

Why aren't my MDI child forms showing a shadow?

做~自己de王妃 提交于 2019-12-30 11:03:39
问题 In my application when I make a form as a child form of my main MDI parent form, the child form stops showing Windows 7 default shadow effect behind forms. How do I get child forms shadow to show? Form obj = Application.OpenForms["My_form"]; if (obj != null) { obj.Focus(); } else { My_form c = new My_form(); c.MdiParent = this; c.Show(); } 回答1: This is normal, entirely by design. MDI child windows are not top-level windows, but rather a special type of child window that is designed to be

FormBorderStyle.None removes the native open effect of windows 8

吃可爱长大的小学妹 提交于 2019-12-29 08:54:07
问题 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? 回答1: 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

Handling AeroSnap message in WndProc

£可爱£侵袭症+ 提交于 2019-12-28 06:24:08
问题 In my C# .NET 4 application, I use WndProc to process some messages mostly dealing with resizing the application to and from full screen. Right now I am just handling SC_MAXIMIZE and WM_NCLBUTTONDBLCLK to determine if the window is being resized to or from a maximized state (I know I don't need WndProc to handle SC_MAXIMIZE , but Form_Resize didn't seem to fire for a WM_NCLBUTTONDBLCLK message when I double-click on the application's title bar. Now I noticed that if I Aero Snap the window to

Aero: How to draw solid (opaque) colors on glass?

时光总嘲笑我的痴心妄想 提交于 2019-12-28 01:57:44
问题 Using GDI+ to draw various colors: brush = new SolidBrush(color); graphics.FillRectangle(brush, x, y, width, height); You'll notice that no opaque color shows properly on glass: How do i draw solid colors on glass? You'll also notice that a fully opaque color is handled differently depending on what color it is: opaque black: fully transparent opaque color: partially transparent opaque white: fully opaque Can anyone point me to the documentation on the desktop compositor that explains how

ALT+TAB in Vista activates main window instead of previously active child window

蓝咒 提交于 2019-12-24 16:16:11
问题 My app (written in C++) uses Win32 (not MFC) to create a couple of windows with CreateWindowEx. The main window gets the desktop as parent, the child windows get the main window as parent. my problem: my app has an active child window I switch to another app (per click, ALT+TAB or other, doesn't matter) I switch back to my app with ALT+TAB Now the main window of my app is activate, not the child window anymore. If I switch back clicking the taskbar entry, the child window remains active. This