/*MessageBox .Show ( Convert.ToString(10, 16));进制转换*/
Size pin = System.Windows.Forms.SystemInformation.WorkingArea.Size;
this.Location = new Point(pin.Width - this.Width - 45, pin.Height - this.Height);
foreach (char kj in "12345678ABCDEFGH")
{
PictureBox xin = new PictureBox();
xin.Parent = this;
xin.Name = kj.ToString();
xin.BorderStyle = BorderStyle.Fixed3D;
xin.Size = new System.Drawing.Size(50, 100);
//xin.Click += new EventHandler(图片单击);
if (xin.Name == "8") xin.Click += new EventHandler(图片单击);
if ("12345678".Contains(kj))
{
xin.Image = 选图区域(@System.Environment.CurrentDirectory + "\\数字\\数字0.jpg", 图0坐标[++循环][0], 图0坐标[循环][1], 图0坐标[0][0], 图0坐标[0][1], xin.Width, xin.Height);
xin.Location = new Point(xin.Width * (int.Parse(kj.ToString()) - 1) + 5 * int.Parse(kj.ToString()), 5);
}
if ("ABCDEFGH".Contains(kj))
{
xin.Image = 选图区域(@System.Environment.CurrentDirectory + "\\数字\\数字0.jpg", 图0坐标[++循环 - 8][0], 图0坐标[循环 - 8][1], 图0坐标[0][0], 图0坐标[0][1], xin.Width, xin.Height);
xin.Location = new Point((xin.Right * (循环 - 9)) + 5 * (循环 - 8), xin.Bottom + 15);
}
}
this.AllowDrop = true; //this.Opacity = .9;
this.DoubleClick += new EventHandler(窗体双击);
this.Resize += new EventHandler(窗体大小);
this.FormClosed += new FormClosedEventHandler(关闭后);
this.DragDrop += new DragEventHandler(窗体拖放);
this.DragEnter += new DragEventHandler(拖入窗体);
private void 图片单击(object sender, EventArgs e)
{
MessageBox.Show(((PictureBox)sender).Name + "\r\n" + ((MouseEventArgs )e).Button .ToString());
}