西西軟件園多重安全檢測(cè)下載網(wǎng)站、值得信賴的軟件下載站!
西西首頁 電腦軟件 安卓軟件 電腦游戲 安卓游戲 排行榜 專題合集

設(shè)置桌面壁紙(定時(shí)自動(dòng)換壁紙)

綠色版帶源碼
  • 設(shè)置桌面壁紙(定時(shí)自動(dòng)換壁紙)綠色版帶源碼
  • 軟件大小:110KB
  • 更新時(shí)間:2013-03-01 10:32
  • 軟件語言:中文
  • 軟件廠商:
  • 軟件類別:國產(chǎn)軟件 / 免費(fèi)軟件 / 桌面工具
  • 軟件等級(jí):4級(jí)
  • 應(yīng)用平臺(tái):WinXP, WinAll
  • 官方網(wǎng)站:暫無
  • 應(yīng)用備案:
好評(píng):50%
壞評(píng):50%

軟件介紹

winform 為圖片添加當(dāng)月的日歷并設(shè)為壁紙,可以手動(dòng)設(shè)置壁紙,也可以定時(shí)設(shè)置壁紙;最主要的特色是在圖片上生成當(dāng)前月的日歷信息。

定時(shí)自動(dòng)換壁紙需要自己手工制定壁紙文件夾,不是從網(wǎng)上自動(dòng)下載。

部分代碼:

/// <summary>
/// 定時(shí)自動(dòng)設(shè)置壁紙
/// </summary>
private void btnAutoSet_Click(object sender, EventArgs e)
{
string path = txtPicDir.Text;
if (!Directory.Exists(path))
{
MessageBox.Show("選擇的文件夾不存在");
return;
}
DirectoryInfo dirInfo = new DirectoryInfo(path);
picFiles = dirInfo.GetFiles("*.jpg");
if (picFiles.Length == 0)
{
MessageBox.Show("選擇的文件夾里面沒有圖片");
return;
}
if (btnAutoSet.Text == "開始")
{
timer1.Start();
btnAutoSet.Text = "停止";
lblStatus.Text = string.Format("定時(shí)自動(dòng)換壁紙中...");
}
else
{
timer1.Stop();
btnAutoSet.Text = "開始";
lblStatus.Text = "";
}
}
/// <summary>
/// 定時(shí)隨機(jī)設(shè)置壁紙
/// </summary>
private void timer_Tick(object sender, EventArgs e)
{
timer1.Interval = 1000 * 60 * (int)numericUpDown1.Value;
FileInfo[] files = picFiles;
if (files.Length > 0)
{
Random random = new Random();
int r = random.Next(1, files.Length);

Bitmap img = (Bitmap)Bitmap.FromFile(files[r].FullName);
pictureBox1.Image = img;

SetWallpaper(img);
}
}

其他版本下載

發(fā)表評(píng)論

昵稱:
表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
查看所有(0)條評(píng)論 > 字?jǐn)?shù): 0/500

TOP
軟件下載