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
{
public Form1()
{
InitializeComponent();
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
label1.Text = listBox1.Text;
}
private void Form1_Load(object sender, EventArgs e)
{
Random ra=new Random ();
int[]s=new int[10];
for(int i=0;i<10;i++){
s[i]=ra.Next(10,99);
listBox1.Items.Add(s[i].ToString());
}
//DateTime da = new DateTime();
}
private void hScrollBar1_Scroll(object sender, ScrollEventArgs e)
{
textBox1.Text = hScrollBar1.Value.ToString();
label1.Font = new Font(label1.Font.Name, hScrollBar1.Value);
}
//int numi = 0;
private void timer1_Tick(object sender, EventArgs e)
{
label2.Text = DateTime.UtcNow.ToString();
//numi+=10;
// pictureBox1.Left = numi;
//if (numi > 249) { numi = 0; }//从左到右
Random ra = new Random();
pictureBox1.Left = ra.Next(0, 250);
pictureBox1.Top = ra.Next(250);
pictureBox2.Left = ra.Next(250);
pictureBox2.Top = ra.Next(250);
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
}
}