Application.EnableVisualStyles Bug

本文介绍了.NET Framework 1.1中Application.EnableVisualStyles方法的一个bug,该bug会导致ImageList中的图像在Windows XP视觉样式下从工具栏、树视图和列表视图中消失。工作环境中,通过在调用Application.EnableVisualStyles之后立即调用ControlPaint.EnableCompatibleTextRenderingDefault作为临时解决方案,可以成功修复此问题。
摘要由CSDN通过智能技术生成

Introduction

Version 1.1 of the .NET framework introduced the method System.Windows.Forms.Application.EnableVisualStyles. Calling this method prior to the creation of any Forms or Controls, will cause Windows XP to apply a theme when rendering Windows Common Controls and many of the native .NET controls like Buttons and CheckBoxes.

Using .NET 1.0, MFC, WTL or VB6, it is necessary to include a manifest, either in the same directory as the executable, or compiled into it as a resource, in order to make use of Windows XP visual styles. While not overly difficult, providing a manifest for every executable one creates is tedious, and Visual Studio has very little tool support for helping you to do so.

The introduction of EnableVisualStyles to v1.1 of the framework is a nice addition because it allows WinForms applications to easily adopt the new look and feel of Windows XP styles

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值