C# winform基础 1、Timer不起作用 2、 设置图片透明

1、设置图片透明

 

this.pibox.BackColor = System.Drawing.Color.Transparent;  //将背景设置为透明
this.pibox.Parent = lab_show;  //将父容器设置为上一层的文件名

 

 

 

2、Timer不起作用

1、先托控件Timer,

并做相关设置 

this.timerpic.Interval = 4000;
this.timerpic.Tick += new System.EventHandler(this.timerpic_Tick);

2、将要处理内容放到this.timerpic_Tick事件中

private void timerpic_Tick(object sender, EventArgs e)
{
pibox.Hide();
}

 

3、启用timerpic

timerpic.Enabled = true;

posted @ 2017-01-19 11:37  心韵  阅读(1310)  评论(0编辑  收藏  举报