سلام
برای قسمت اول سوالت اگه منظورتون پس زمینه ویندوز هست یه سمپل میزارم اما قسمت دوم
باید تو برنامیت یه تایمر یزار و یه چک کننده اینترنت با ترد
وقتی متصل شد ادرس یه سروری که عکس ها رو درون اون پوشه قرار میدی رو در برنامه درج میکنی و تایمر هم مان میدی مثل 30 ثانیه یک بار تصاویر رو عوض کنه
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
//using System.Runtime.InteropServices;
namespace SetTimer
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text != "")
{
Wallpaper.Style style = new Wallpaper.Style();
switch (comboBox1.Text)
{
case "Stretch":
style=Wallpaper.Style.Stretched;
break;
case "Tile":
style = Wallpaper.Style.Tiled;
break;
case "Center":
style = Wallpaper.Style.Centered;
break;
}
Wallpaper.Set(textBox1.Text, style);
}
}
private void button2_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
textBox1.Text = openFileDialog1.FileName;
pictureBox2.Image = Image.FromFile(openFileDialog1.FileName);
pictureBox2.Visible = true;
comboBox1.SelectedIndex = 2;
}
}
private void Form1_Load(object sender, EventArgs e)
{
Wallpaper.Set(Application.StartupPath+"\\Test.jpg",Wallpaper.Style.Stretched);
}
}
}