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 _21April_2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void groupBox2_Enter(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
pictureBoxOlustur();
}
private void pictureBoxOlustur()
{
int X = 29;
int Y = 50;
for (int j = 0; j < 11; j++)
{
for (int i = 0; i < 10; i++)
{
PictureBox pb = new PictureBox();
pb.Name = "pb" + j.ToString() + "_" + i.ToString();
pb.BackgroundImageLayout = ImageLayout.Stretch;
pb.Size = new Size(20, 20);
pb.Top = Y;
pb.Left = X;
pb.BackgroundImage = Properties.Resources.Bos_fw;
this.Controls.Add(pb);
Y += 23;
}
X += 33;
Y = 50;
}
}
int Sira = 1;
private void txtChanged(object sender, EventArgs e)
{
string Adi = ((TextBox)sender).Name;
string Text = ((TextBox)sender).Text;
int No = Convert.ToInt32(Adi.Substring(3, Adi.Length - 3));
this.Controls.Find("pb" + No.ToString() + "_" + Text,true)[0].BackgroundImage = Properties.Resources.Dolu_fw;
SendKeys.Send("{TAB}");
}
Hiç yorum yok:
Yorum Gönder