加载中…
个人资料
思宜夏普
思宜夏普
  • 博客等级:
  • 博客积分:0
  • 博客访问:2,005
  • 关注人气:5
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

C#调用Resources资源文件夹中的图片

(2012-09-19 18:10:46)
标签:

文件夹

调用

c

资源

杂谈

        private void button1_Click(object sender, EventArgs e)
        {
            if (button1.BackgroundImage==Properties.Resources.start)
            {
                button1.BackgroundImage = Properties.Resources.stop;
            }
            else
            {
                button1.BackgroundImage=Properties.Resources.start;
            }
        }

 

以上是不完全成功代码

 

private void button1_Click(object sender, EventArgs e)
        {
            if (isStart==false)
            {
                button1.BackgroundImage = Properties.Resources.stop;
                isStart = true;
            }
            else
            {
                button1.BackgroundImage = Properties.Resources.start;
                isStart = false;
            }
        }

 

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有