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

推荐订阅源

T
Threatpost
V
Vulnerabilities – Threatpost
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
G
GRAHAM CLULEY
S
Securelist
P
Palo Alto Networks Blog
MongoDB | Blog
MongoDB | Blog
A
Arctic Wolf
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
WordPress大学
WordPress大学
Project Zero
Project Zero
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
F
Fortinet All Blogs
博客园 - 叶小钗
B
Blog RSS Feed
C
Cisco Blogs
Google DeepMind News
Google DeepMind News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
K
Kaspersky official blog
D
Docker
Latest news
Latest news
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
Cyberwarzone
Cyberwarzone
Security Latest
Security Latest
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
C
Check Point Blog
J
Java Code Geeks
Simon Willison's Weblog
Simon Willison's Weblog
T
Tenable Blog
Recent Announcements
Recent Announcements
T
Tailwind CSS Blog
H
Help Net Security
L
LINUX DO - 热门话题
T
The Exploit Database - CXSecurity.com
Jina AI
Jina AI
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
NISL@THU
NISL@THU
美团技术团队
腾讯CDC

博客园 - 书生无用

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#