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

設置桌面壁紙(定時自動換壁紙)

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

軟件介紹

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

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

部分代碼:

/// <summary>
/// 定時自動設置壁紙
/// </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("定時自動換壁紙中...");
}
else
{
timer1.Stop();
btnAutoSet.Text = "開始";
lblStatus.Text = "";
}
}
/// <summary>
/// 定時隨機設置壁紙
/// </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ā)表評論

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

TOP
軟件下載