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;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
for (int i = 1; i <= 300; i+=3)
{
this.Width += 1;
this.pictureBox1.Width += 1;
this.hScrollBar1.Width += 1;
this.Refresh();
}
this.button1.Visible = false;
this.button2.Visible = true;
}
private void button2_Click(object sender, EventArgs e)
{
for (int i = 1; i <= 300; i+=3)
{
this.Width -= 1;
this.pictureBox1.Width -= 1;
this.hScrollBar1.Width -= 1;
this.Refresh();
}
this.button1.Visible = true;
this.button2.Visible = false;
}
private void hScrollBar1_Scroll(object sender, ScrollEventArgs e)
{
this.Opacity = this.hScrollBar1.Value/1000.0;
}
}
}