- UID
- 381062
- 在线时间
- 0 小时
- 最后登录
- 2013-10-31
- 注册时间
- 2013-2-24
- 宅魂
- 245 点
- 贡献
- 39 点
- 宅币
- 1295 枚
- 宅の石(入宅度)
- 0 块
- 元气(技能点)
- 2 点
- 活跃
- 0 ℃
- 听众
- 4
- 收听
- 0
该用户从未签到
Continue
- 积分
- 1947
|
发表于 2013-3-25 10:44:11
|
显示全部楼层
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
int n = 0;
private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
Bitmap pit1 = new Bitmap(@"C:\Users\Maysfolo\Pictures\青蛙\1.jpg");
Bitmap pit2 = new Bitmap(@"C:\Users\Public\Pictures\Sample Pictures\蘑菇maysfolo.jpg");
Bitmap pit3 = new Bitmap(@"C:\Users\Public\Pictures\Sample Pictures\2.jpg");
Bitmap pit4 = new Bitmap(@"C:\Users\Public\Pictures\Sample Pictures\3.jpg");
Bitmap pit5 = new Bitmap(@"C:\Users\Maysfolo\Pictures\青蛙\2.png");
switch (n)
{
case 0: pictureBox1.Image = pit1; n = n + 1; break;
case 1: pictureBox1.Image = pit2; n = n + 1; break;
case 2: pictureBox1.Image = pit3; n = n + 1; break;
case 3: pictureBox1.Image = pit4; n = n + 1; break;
case 4: pictureBox1.Image = pit5; n = 0; break;
default: MessageBox.Show ("error"); break;
}
}
}
}
|
|