日期:2014-05-17 浏览次数:21345 次
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 Test_Eight.Properties;
namespace Test_Eight
{
public partial class AutoPlay : Form
{
public AutoPlay()
{
InitializeComponent();
}
private Bitmap MyBitmap; //事件公用变量
//初始化
private void AutoPlay_Load(object sender, EventArgs e)
{
Bitmap SrcBitmap = new Bitmap(Resources._1); //把打开的图像赋给Bitmap变量
MyBitmap = new Bitmap(SrcBitmap, this.pictureBox_Show.Width, this.pictureBox_Show.Height);
this.pictureBox_Show.Image = MyBitmap; //在控件上显示图像
timer_Change.Enabled = true;
}
//对接
private void Joint()
{
try
{
int width = this.pictureBox_Show.Width;//图像宽度
int height = this.pictureBox_Show.Height;//图像高度
Graphics g = this.pictureBox_Show.CreateGraphics();
g.Clear(Color.Gray);
Bitmap bitmap = new Bitmap(width, height);
int x = 0;
while (x <= height / 2)
&n