又没人用C#写的让桌面开满999朵玫瑰的软件 有没有啊? 有其他语言写的也行,顺便把这款软件的原理说下。是不是用一个容器控件然后再在容器里重绘图片就行了? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 参考一下这个http://www.codeproject.com/Articles/29184/A-lovely-goldfish-desktop-pet-using-alpha-PNG-and 话说 刚才尝试了一下做了一个、、貌似还不错只是效果不咋滴;每一秒在屏幕上叠加1.png那张图using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;namespace WindowsFormsApplication2{ public partial class Form1 : Form { public Form1() { InitializeComponent(); this.FormBorderStyle = FormBorderStyle.None; this.Location = new Point(0, 0); this.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); } Graphics g; private void Form1_Load(object sender, EventArgs e) { this.TopMost = true; this.BackColor = Color.Green; TransparencyKey = Color.Green; button1.Location = new Point(this.Width - button1.Width, this.Height - button1.Height); button1.Text = "Exit"; pictureBox1.Image = new Bitmap(this.Width,this.Height); pictureBox1.Dock = DockStyle.Fill; Thread threadShowFlower = new Thread(new ThreadStart(ShowFlower)); threadShowFlower.IsBackground = true; threadShowFlower.Start(); } public void ShowFlower() { Point pt = new Point(); Random rnd = new Random(); Bitmap bmp = new Bitmap(Image.FromFile("1.png")); g = pictureBox1.CreateGraphics(); for (int i = 0; i < 10; i++) { Thread.Sleep(1000); pt.X = rnd.Next(1, this.Width - bmp.Width); pt.Y = rnd.Next(1, this.Height - bmp.Height); g.DrawImage(bmp,pt); } g.Dispose(); } private void button1_Click(object sender, EventArgs e) { g.Dispose(); Environment.Exit(0); } }} 有啊,我就在csdn上下载过。找找吧 就是在桌面上画图或贴图,还有一些图片局部透明什么的吧,不过要做的漂亮不太容易。我用vc会做。C#还在初学还不会。 添加一张动态生成玫瑰花的gif图片不就得了,,还那里用代码写 一张gif玫瑰图片,然后在不同位置不同时间画啊画啊 c# contextmenustrip动态添加菜单内容 关于winform程序发布的问题 关于如何判断窗体获得焦点的问题,请高手指点! 请教SQLHelper中的一些问题,急!!!!! 简单问题,两个一样功能的按钮,a按钮调用b按钮的按钮事件怎么写? 请问怎么实现label上字符的平移效果? C# 开发Windows服务中使用委托 关于Timer使用,为什么程序会死掉 C# socket udp 发现个问题 域和属性有什么区别啊? 求一表达式,请高手帮忙! 错误:WebForm_DoPostBackWithOptions is not defined是怎么回事
http://www.codeproject.com/Articles/29184/A-lovely-goldfish-desktop-pet-using-alpha-PNG-and
每一秒在屏幕上叠加1.png那张图using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;using System.Threading;namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1() {
InitializeComponent();
this.FormBorderStyle = FormBorderStyle.None;
this.Location = new Point(0, 0);
this.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
} Graphics g;
private void Form1_Load(object sender, EventArgs e) {
this.TopMost = true;
this.BackColor = Color.Green;
TransparencyKey = Color.Green; button1.Location = new Point(this.Width - button1.Width, this.Height - button1.Height);
button1.Text = "Exit";
pictureBox1.Image = new Bitmap(this.Width,this.Height);
pictureBox1.Dock = DockStyle.Fill; Thread threadShowFlower = new Thread(new ThreadStart(ShowFlower));
threadShowFlower.IsBackground = true;
threadShowFlower.Start();
} public void ShowFlower() {
Point pt = new Point();
Random rnd = new Random();
Bitmap bmp = new Bitmap(Image.FromFile("1.png"));
g = pictureBox1.CreateGraphics();
for (int i = 0; i < 10; i++) {
Thread.Sleep(1000);
pt.X = rnd.Next(1, this.Width - bmp.Width);
pt.Y = rnd.Next(1, this.Height - bmp.Height);
g.DrawImage(bmp,pt);
}
g.Dispose();
} private void button1_Click(object sender, EventArgs e) {
g.Dispose();
Environment.Exit(0);
}
}
}
我用vc会做。C#还在初学还不会。