All pastes #436364 Raw Edit

Something

public text v1 · immutable
·published 2007-04-12 13:47 UTC
rendered paste body
using System.Windows.Forms;
using System.Drawing;

static class Program
{
	static void Main ()
	{
		Application.Run (new Frm ());
	}
}

class Frm : Form
{
	PictureBox pb2;
	
	public Frm ()
	{
		PictureBox pb1 = new PictureBox ();
		pb2 = new PictureBox ();

		pb1.Image = Image.FromFile (@"C:\Users\Jonathan Pobst\Pictures\Energy Bliss.jpg");
		pb2.Image = Image.FromFile (@"C:\Users\Jonathan Pobst\Documents\Visual Studio 2005\Projects\MonoCHelloWorld\MonoCHelloWorld\images\edit-cut.png");

		pb1.Size = new Size (100, 100);
		pb2.Size = new Size (16, 16);
		
		pb2.Visible = false;
		
		Controls.Add (pb2);
		Controls.Add (pb1);
		
		Button b = new Button ();
		b.Location = new Point (125, 0);
		b.Click += new System.EventHandler (b_Click);
		Controls.Add (b);
	}

	void b_Click (object sender, System.EventArgs e)
	{
		pb2.Visible = !pb2.Visible;
	}
}