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

2023-03-09,,

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;

C# winform基础 1、Timer不起作用 2、 设置图片透明的相关教程结束。

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

下载本文的Word格式文档,以方便收藏与打印。