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 formgyak_3_6
- {
- public partial class Form1 : Form
- {
- PictureBox[] kepek = new PictureBox[9];
- public Form1()
- {
- InitializeComponent();
- Kirajzol();
- }
- private void Kirajzol()
- {
- for (int i = 0; i < 360; i += 45)
- {
- int j = i / 45;
- kepek[j] = new PictureBox();
- kepek[j].Image = Image.FromFile((j+1).ToString() + ".jpg");
- kepek[j].Width = 50;
- kepek[j].Height= 50;
- double x = 150 * Math.Cos(i*Math.PI/180) - 26 + this.Width / 2;
- double y = 150 * Math.Sin(i*Math.PI/180) - 26 + this.Height / 2;
- kepek[j].Location = new Point((int)x, (int)y);
- this.Controls.Add(kepek[j]);
- }
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement