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
{
Image d;
public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{
int x = 10;
int y = 0;
for (int i = 0; i < 100; i++)
{
Label lbl = new Label();
lbl.Text = string.Format("{0}", i + 1);
lbl.Font = new Font("宋体", 10);
lbl.Size = new Size(50, 30);
if (i % 16 == 0)
{
x = 10;
y += 90;
}
lbl.Location = new Point(x, y); x += 80;
this.Controls.Add(lbl);
}
Random r = new Random(); int j = 10; int k = -60;
for (int i = 0; i < 100; i++)
{
PictureBox p = new PictureBox();
p.Image = System.Drawing.Bitmap.FromFile(@"icon\" + r.Next(1, 40) + ".bmp"); p.Width = 50;
p.Height = 50; if (i % 16 == 0)
{
j = 10;
k += 90;
} p.Location = new Point(j, k); j += 80;
this.Controls.Add(p);
}
Button b = new Button();
b.Text = "重试";
b.Top = 600;
b.Left = 450;
b.Width = 100;
b.Height = 20;
this.Controls.Add(b);
Button b1 = new Button();
b1.Text = "读心";
b1.Top = 600;
b1.Left = 850;
b1.Width = 100;
b1.Height = 20;
this.Controls.Add(b1);
PictureBox p1 = new PictureBox();
p1.Image = d;
p1.Top = 600;
p1.Left = 1000;
p1.Width = 100;
p1.Height = 100;
this.Controls.Add(b1);
}
}
}
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
{
Image d;
public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{
int x = 10;
int y = 0;
for (int i = 0; i < 100; i++)
{
Label lbl = new Label();
lbl.Text = string.Format("{0}", i + 1);
lbl.Font = new Font("宋体", 10);
lbl.Size = new Size(50, 30);
if (i % 16 == 0)
{
x = 10;
y += 90;
}
lbl.Location = new Point(x, y); x += 80;
this.Controls.Add(lbl);
}
Random r = new Random(); int j = 10; int k = -60;
for (int i = 0; i < 100; i++)
{
PictureBox p = new PictureBox();
p.Image = System.Drawing.Bitmap.FromFile(@"icon\" + r.Next(1, 40) + ".bmp"); p.Width = 50;
p.Height = 50; if (i % 16 == 0)
{
j = 10;
k += 90;
} p.Location = new Point(j, k); j += 80;
this.Controls.Add(p);
}
Button b = new Button();
b.Text = "重试";
b.Top = 600;
b.Left = 450;
b.Width = 100;
b.Height = 20;
this.Controls.Add(b);
Button b1 = new Button();
b1.Text = "读心";
b1.Top = 600;
b1.Left = 850;
b1.Width = 100;
b1.Height = 20;
this.Controls.Add(b1);
PictureBox p1 = new PictureBox();
p1.Image = d;
p1.Top = 600;
p1.Left = 1000;
p1.Width = 100;
p1.Height = 100;
this.Controls.Add(b1);
}
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货