视觉样式 [英] Visual Styles

查看:118
本文介绍了视觉样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用程序中使用视觉样式,但它导致了我使用的DLL的问题
。有没有办法禁用该DLL的视觉样式?我这样做了
无法访问DLL的代码。这个DLL的开发人员知道这个问题的b $ b,但是我没有及时准备好修复。

I want to use visual styles in my app, but it is causing a problem with
a DLL I use. Is there a way to disable visual styles for that DLL? I do
not have access to the code for the DLL. The DLL''s developer is aware
of the problem but will not have a fix ready in time for me.

推荐答案




据我所知,为整个应用程序启用了视觉stules(或者至少每个UI线程

)你不可能有一些控件启用

视觉风格而另一部分没有。


但是我发现从.NET启用视觉效果引起问题一些

次。如果启用视觉样式而不是形成.NET

代码,但是使用清单文件似乎工作正常。


在这里你可以找到如何获取信息使用清单启用视觉stules

文件

http://msdn.microsoft.com/library/de...ndowsForms.asp


-


Stoitcho Goutsev(100)


< ML **** @ hotmail.com>在消息中写道

news:11 ********************* @ u72g2000cwu.googlegro ups.com ...
Hi,

As far as I know the visual stules are enabled for the whole application (or
at least per UI thread) you can''t have some of the controls with enabled
visual styles and the other part not.

However I found that enabling visual stules from .NET cause problems some
times. It seems to work OK if the visual styles are enabled not form .NET
code, but by using manifest file.

Here you can find informarmation how to enable visual stules using manifest
files

http://msdn.microsoft.com/library/de...ndowsForms.asp

--

Stoitcho Goutsev (100)

<ML****@hotmail.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
我想在我的应用程序中使用视觉样式,但它导致我使用的DLL的问题。有没有办法禁用该DLL的视觉样式?我没有权限访问DLL的代码。 DLL的开发人员知道这个问题,但是我没有及时修复。
I want to use visual styles in my app, but it is causing a problem with
a DLL I use. Is there a way to disable visual styles for that DLL? I do
not have access to the code for the DLL. The DLL''s developer is aware
of the problem but will not have a fix ready in time for me.



你可以调用SetWindowTheme ()(来自uxtheme.dll的Interop调用)禁用

特定控件的视觉样式。将String.Empty传递给2字符串

禁用Visual Styles的参数和null重新启用。


[DllImport(" uxtheme.dll")) ]

私有静态extern IntPtr SetWindowTheme(IntPtr hWnd,String

pszSubAppName,String pszSubIdList);


-

Mick Doherty
http://dotnetrix.co.uk /nothing.html

< ML **** @ hotmail.com>在消息中写道

news:11 ********************* @ u72g2000cwu.googlegro ups.com ...
You can call SetWindowTheme() (Interop call from uxtheme.dll) to disable
Visual Styles for a specific control. Pass String.Empty to the 2 string
Arguments to disable Visual Styles and null to re-enable.

[DllImport("uxtheme.dll")]
private static extern IntPtr SetWindowTheme(IntPtr hWnd, String
pszSubAppName, String pszSubIdList);

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
<ML****@hotmail.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
我想在我的应用程序中使用视觉样式,但它导致我使用的DLL的问题。有没有办法禁用该DLL的视觉样式?我没有权限访问DLL的代码。 DLL的开发人员知道这个问题,但是我没有及时准备好修复。
I want to use visual styles in my app, but it is causing a problem with
a DLL I use. Is there a way to disable visual styles for that DLL? I do
not have access to the code for the DLL. The DLL''s developer is aware
of the problem but will not have a fix ready in time for me.



谢谢,Mick。我试过SetWindowTheme。它确实改变了DLL创建的对话框/控件的外观,但是问题

仍然存在。当我创建对话框时,我认为我需要禁用视觉样式。


还有其他想法吗?

Thanks, Mick. I have tried SetWindowTheme. It does change the
appearance of the dialogs/controls created by the DLL, but the problem
persists. I think I need the visual styles disabled when the dialog is
created.

Any other ideas?


这篇关于视觉样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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