代碼
int i = 0;
private void timer1_Tick(object sender, EventArgs e)
{
if (i%2==0)
{
label1.Image = null;
}
else
{
label1.Image = Image.FromFile("C:\\test.png");
}
i++;
}
bool jnotifyicon = true;
private void timer1_Tick(object sender, EventArgs e)
{
if (jnotifyicon)
{
notifyIcon1.Icon = new Icon(AppDomain.CurrentDomain.BaseDirectory + "透明.ico");
jnotifyicon = !jnotifyicon;
}
else
{
jnotifyicon = !jnotifyicon;
notifyIcon1.Icon = new Icon(AppDomain.CurrentDomain.BaseDirectory + "喇叭.ico");
}
}
Label lb1 = new Label();
lb1.Name = "label1";
lb1.Text = comboBox2.Text.ToString();
lb1.Size = new System.Drawing.Size(84, 14);
lb1.BackColor = Color.Yellow;
lb1.Location = new Point(115, 250);
lb1.Update();
lb1.Refresh();
pictureBox1.Controls.Add(lb1);
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。