使用DwmExtendFrameIntoClientArea创建“非模糊”TextBox [英] Creating a 'non-blurred' TextBox with DwmExtendFrameIntoClientArea

查看:122
本文介绍了使用DwmExtendFrameIntoClientArea创建“非模糊”TextBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用DwmExtendFrameIntoClientArea为我的窗口部分提供Alice-through-the-looking-glass Aero效果。如果我在表单上放置按钮等控件,则表示正常。但是,像文本框这样的控件最终会出现内容模糊。
有什么方法围绕这个?


Paul Cotter

I am using DwmExtendFrameIntoClientArea to give part of my window that Alice-through-the-looking-glass Aero effect. If I place controls such as buttons on my form then they appear as normal. However controls like textboxes end up with blurred contents. Is there any way round this?


Paul Cotter

推荐答案

你的意思是文字显示为半/文本框在Glass上时是透明的吗?

Do you mean that text shows up as semi/transparent when the textbox is on Glass?

如果是这样,那么你需要自定义绘制文本框(非常困难的任务)或者通过绘制玻璃效果从文本框中排除文本框它背后的区域除了黑色或空白之外的其他颜色。

If so, then you'll need to custom paint the textbox (quite a difficult task) or exclude the textbox from the glass effect by painting the area behind it some color other than black or empty.

或者,您可以使用我的GlassUI库,其中包含自定义绘制的文本框。您可以按照签名中的codeplex链接下载dll或C#源代码。

Alternatively, you can use my GlassUI library which includes a custom painted Textbox. You can download the dll or the C# sourcecode by following the codeplex link in my signature.


这篇关于使用DwmExtendFrameIntoClientArea创建“非模糊”TextBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆