fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace WindowsFormsApplication1
  11. {
  12. public partial class Form1 : Form
  13. {
  14. public Form1()
  15. {
  16. InitializeComponent();
  17. this.Load += new EventHandler(Form1_Load);
  18. }
  19. PictureBox pictureBox1 = new PictureBox();
  20. void Form1_Load(object sender, EventArgs e)
  21. {
  22. pictureBox1.Dock = DockStyle.Fill;
  23. pictureBox1.BackColor = Color.Magenta;
  24. this.Controls.Add(pictureBox1);
  25. string s = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
  26. Bitmap bmp1 = new Bitmap(s + "\\aaa.png");
  27. Bitmap bmp2 = new Bitmap(s + "\\bbb.png");
  28. using (Graphics g = Graphics.FromImage(bmp1))
  29. {
  30. g.DrawImage(bmp2, 0, 0);
  31. }
  32. pictureBox1.Image = bmp1;
  33. this.ClientSize = bmp1.Size;
  34. }
  35. }
  36. }
  37.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty