Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApplication2
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e) {
- this.Width = 800;
- List<PictureBox> bazinga = new List<PictureBox>(10);
- for (int i = 0; i < 10; ++i) {
- bazinga.Add(new PictureBox());
- this.Controls.Add(bazinga[i]);
- bazinga[i].Size = new Size(this.Width/10-10, this.Width/10-10);
- bazinga[i].SizeMode = PictureBoxSizeMode.StretchImage;
- bazinga[i].Image = Image.FromFile("bazinga.png");
- bazinga[i].Location = new Point((this.Width/10)*i, 10);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement