惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
A
Arctic Wolf
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Schneier on Security
T
Tenable Blog
I
Intezer
S
Securelist
Scott Helme
Scott Helme
V
Visual Studio Blog
Simon Willison's Weblog
Simon Willison's Weblog
Google DeepMind News
Google DeepMind News
T
The Blog of Author Tim Ferriss
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AWS News Blog
AWS News Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MongoDB | Blog
MongoDB | Blog
L
LangChain Blog
F
Fortinet All Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cisco Blogs
L
Lohrmann on Cybersecurity
M
MIT News - Artificial intelligence
G
GRAHAM CLULEY
博客园 - 司徒正美
aimingoo的专栏
aimingoo的专栏
雷峰网
雷峰网
MyScale Blog
MyScale Blog
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Announcements
Recent Announcements
C
CXSECURITY Database RSS Feed - CXSecurity.com
量子位
博客园 - 三生石上(FineUI控件)
P
Proofpoint News Feed
Blog — PlanetScale
Blog — PlanetScale
云风的 BLOG
云风的 BLOG
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
Cisco Talos Blog
Cisco Talos Blog
Security Latest
Security Latest
Project Zero
Project Zero
K
Kaspersky official blog
罗磊的独立博客
Know Your Adversary
Know Your Adversary
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - 书生无用

Replace the with CR in Microsoft Excel using maven and eclipse created a mutiple module project for eclipse 开源的codecoverage(测试代码覆盖率)检测工具 使用zoudry编辑blog的设置 wiki为什么会流行 实现 DWR Sample 的几个要注意的问题(2) DWR Sample的两个问题 几个有意思的在线服务网站 静悄悄的变化 APPFUSE wiki中文文档问题解决了 appfuse使用Taperstry框架(一)——创建Tapestry框架页面 又是一个艳阳天 有几个Gmail、Wallop邀请 Appfuse开发实践(五)—— 增加校验和列表页面 Appfuse开发实践(四)——创建Webwork 框架的 Actions和JSP Appfuse开发实践(三) —— 创建Manager类 Appfuse开发实践(二)——创建DAO对象 Appfuse里面带的Ant任务列表 Appfuse实践(一)——配置安装
Improve the speed to display a transparent background winform
书生无用 · 2006-09-21 · via 博客园 - 书生无用

If you set a background picture for a Winform and add some transparent control on the form. All controls on the form will displayed one by one. The winform displays in very slow speed. I browsed some article and found the solution. Add the following code to override the BackgroundImage property of the winform.

    private Bitmap m_BackgroundBitmap;
    private const int SCREEN_WIDTH = 1024;
    private const int SCREEN_HEIGHT = 768;
    public override Image BackgroundImage
    {
      set
      {
        m_BackgroundBitmap = new Bitmap(SCREEN_WIDTH,SCREEN_HEIGHT,PixelFormat.Format32bppPArgb);
        Graphics g = Graphics.FromImage(m_BackgroundBitmap);
        g.DrawImage(value, 0, 0, m_BackgroundBitmap.Width, m_BackgroundBitmap.Height);
        g.Dispose();
      }

      get
      {
        return m_BackgroundBitmap;
      }
    }

Compile and test the application. Everything is OK. There are an useful article from MSDN which talks about the performance of the Windows Form application. The Figure 5 give the sample code to resolve the problem for the transparent background winform.

Technorati : C#