Tc Kimlik Numarasına göre otomatik optik kod doldur — Csharp
Tc Kimlik Numarasına göre otomatik optik kod doldur — Csharp
Soru :
Textboxlara girilen Tc Kimlik Numarasına göre otomatik olarak optik kodlama yapan programın csharp windows forms application kodlarını yazınız.
Not : Textboxlara tek sayı girebilcek. Bir sayı girildiğinde imleç otomatik olarak diğer textbox’a konumlanacak.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;//www.gorselprogramlama.com 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; // +33 int Y = 50; // +23 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;//www.gorselprogramlama.com 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}");//www.gorselprogramlama.com } } }