问题描述
我正在使用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
推荐答案
如果是这样,那么你需要自定义绘制文本框(非常困难的任务)或者通过绘制玻璃效果从文本框中排除文本框它背后的区域除了黑色或空白之外的其他颜色。
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!