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

推荐订阅源

MyScale Blog
MyScale Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
博客园 - 叶小钗
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
爱范儿
爱范儿
小众软件
小众软件
K
Kaspersky official blog
P
Proofpoint News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
V
Vulnerabilities – Threatpost
博客园_首页
Microsoft Security Blog
Microsoft Security Blog
C
Cybersecurity and Infrastructure Security Agency CISA
V
V2EX
C
Check Point Blog
S
Schneier on Security
P
Palo Alto Networks Blog
IT之家
IT之家
GbyAI
GbyAI
T
Threat Research - Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Apple Machine Learning Research
Apple Machine Learning Research
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tailwind CSS Blog
Project Zero
Project Zero
Y
Y Combinator Blog
V
Visual Studio Blog
Simon Willison's Weblog
Simon Willison's Weblog
T
Threatpost
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
S
Securelist
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理

博客园 - adi

C# new用法总结 TreeView ADD DEL - adi TreeView2Xml - adi - 博客园 xml节点删除修改 子页面关闭时刷新父页面 javascript + asp.net - adi ASP.NET 弹出对话框和页面之间传递值的经验总结 Oracle 9.2下的“System.Exception: System.Data.OracleClient requires Oracle client software version 8.1.7 or greater” Oracle 10g ORA-12154: TNS: could not resolve the connect identifier specified 问题解决! sql游标 分组合并 No relevant source lines 关于Ajax 错误:'sys'未定义解决方法. 未能加载文件或程序集 system.web.extensions解决方法 要求使用 IIS 6.0 动态内容时 " HTTP 错误 404 - 文件或目录找 " 错误信息 VB.net与Media Player9.0嵌入式开发 企业中的Windows Media Services 流媒体 http://www.cnblogs.com/hmmcsdd/archive/2007/10/11/windowsmediasdjieshao.html 解决AJAX中使用UpdatePanel后再用Response.Write();等无法弹出对话框问题 3法
PictureBox
adi · 2008-09-10 · via 博客园 - adi

 private void InitGroupBox()
        {
            for (int k = 0; k < 16;k++ )
            {
                PictureBox pic = new PictureBox();
                int i = k % 4;
                int j = k / 4;
                pic.Name = k.ToString();
                pic.Top = 50 + j * 201;
                pic.Left = 50+i * 251;
                pic.Width = 250;
                pic.Height = 200;
                //pic.Visible = true;
                pic.Click  += new EventHandler(PictureBox_Click);
                pic.Paint += new PaintEventHandler(pictureBox_Paint);
                pic.BorderStyle = BorderStyle.FixedSingle;
                this.GroupPanel.Controls.Add(pic);
            }
        }
        private void PictureBox_Click(object sender, EventArgs e)
        {
            PictureBox p = (PictureBox)sender;
            if (p == old) return;

            if (old != null)
            {
                old.Width -= 10;
                old.Height -= 10;
                old.Location = new Point(old.Location.X + 5, old.Location.Y + 5);
            }

            old = p;
            p.Width += 10;
            p.Height += 10;
            p.Location = new Point(p.Location.X - 5, p.Location.Y - 5);
            p.BringToFront(); 
          
        }
        private void pictureBox_Paint(object sender, PaintEventArgs e)
        {
            PictureBox p = (PictureBox)sender;
            if (p == old)
            {
                Pen pp = new Pen(Color.Red);
                e.Graphics.DrawRectangle(pp, e.ClipRectangle.X, e.ClipRectangle.Y, e.ClipRectangle.X + e.ClipRectangle.Width - 1, e.ClipRectangle.Y + e.ClipRectangle.Height - 1);
            }
        }