• Giriş

Gorsel Programlama

  • AnaSayfa
  • Hakkımızda
  • TOP-10 Proje
  • Download
  • Özel Ders
  • Reklam Verin
  • Destek
  • İletişim
RSS feed
  • Youdao
  • Xian Guo
  • Zhua Xia
  • Google
  • My Yahoo!
  • newsgator
  • Bloglines
  • iNezha
© 2009-2020 Gorsel Programlama

Listbox ta seçilen değere sahip Textbox ın rengini değiştir — Csharp

Listbox ta seçilen değere sahip Textbox ın rengini değiştir — Csharp

Soru :  Form açıldığında  15 adet textbox ın içine rastgele sayı gelecektir. Listboxta tıklanan değer ile aynı olan textbox ın arka plan rengi değişecektir.

 

textbox_renk_degistir3

 


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;//www.gorselprogramlama.com
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace random_textbox_sayi_ekle
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private TextBox[] txtSoru;//www.gorselprogramlama.com
private void Form1_Load(object sender, EventArgs e)
{
for (int i = 0; i < 15; i++)
{
listBox1.Items.Add(i);
}

txtSoru = new TextBox[15];//www.gorselprogramlama.com

for (int i = 0; i < 15; i++)
{

txtSoru[i] = new TextBox();

txtSoru[i].Location = new Point(50, 26 * i+10);

this.Controls.Add(txtSoru[i]);//www.gorselprogramlama.com

}
Random r = new Random();
for (int i = 0; i < 15; i++)
{
txtSoru[i].Text = r.Next(16).ToString();
}
}

private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
for (int i = 0; i < 15; i++)
{
txtSoru[i].BackColor = System.Drawing.SystemColors.Window;
}
for (int i = 0; i < 15; i++) //www.gorselprogramlama.com
{
if(Convert.ToInt32( listBox1.Text)== Convert.ToInt32(txtSoru[i].Text))
{
txtSoru[i].BackColor = Color.Red;
}
}

}
}
}

 

textbox_renk_degistir

 

textbox_renk_degistir2

Projeyi İNDİR

Paylaş :
Tweet
Yorum Yazın | Geri
24 Mayıs Salı,2016 Tarihinde Yayınlanmıştır. Bulunduğu Kategori : Görsel Programlama
Etiket: kod ile oluşturulan textbox a rastgele sayı, kod ile textbox oluştur, listbox seçilen değer, Listbox ta seçilen değere sahip Textbox ın rengini değiştir Csharp, textbox random sayı
« Kütüphane Takip Programı (Kitap Resimli – Kitap geç gelince ceza bilgilendirici) — Csharp TextBox ‘ a sadece ondalık (double) sayı girilsin — Csharp »
Henüz Yorum Yok.

Yorum Yazın ...

Cevabı İptal
XHTML: Bu Etiketleri Kullanabilirsiniz : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
RSS Bu Yazıya Yapılan Yorumlar


Site içi Arama

Takip et: @GorselProgram







Böyle bir web sayfam olsun diyorsanız iletişim bölümünden veya gorselprogram@gmail.com mail adresinden bize ulaşabilirsiniz.

Son Yazılar

  • C# Console Application İçi Boş Üçgen
  • C# WindowsForm Çekiliş Uygulaması
  • C# WindowsForm Login Remember Me (Remember me Checkbox)
  • Migros market 2 Reklam Banner Örneği — Flash
  • C# WindowsForm ile TC Kimlik Numarası, İsim, Soyisim, E-Mail Kontrol Yapıları

Etiket Bulutu

.NET Application basit C# C#.NET application C#.NET codes C#.NET examples C#.NET lessons C#.NET practice C#.net örnekleri c# console dersleri c# console örnekleri C# ders c# dersleri c# örnek c# örnekleri C.net dersleri c dersleri code console console örnekleri Csharp csharp dersleri csharp net csharp örnekleri c örnekleri download Flash örnekleri forms Forms örnekleri full indir kod kodlar nesne tabanlı programlama OleDbConnection OleDbDataAdapter tam sürüm uygulama vb net win windows windows forms application örnek ücretsiz

Kategoriler

  • Access (59)
  • Akış Diyagramı Flowchart (69)
  • Android Eğitimleri (2)
  • Asp Net (47)
  • C# (830)
  • C# Console (222)
  • Css (19)
  • Dersler (191)
  • Dökümanlar (21)
  • Dreamweaver (12)
  • Excel (8)
  • Fireworks (27)
  • Flash (76)
  • Görsel Programlama (419)
  • GorselProgramlama.Com (8)
  • Html (34)
  • Pascal (2)
  • Photoshop (5)
  • PHP (2)
  • Planlar (114)
  • Programlama Tanım (4)
  • Sınavlar (128)
  • Sql (10)
  • VB 6.0 (45)
  • VB.NET (219)
  • Videolar (65)
  • Word (7)

Arşiv

Bağlantılar

  • Html Dersleri
  • Muslu.NET
  • Programlama Dersleri

Kimler Sitede ?


    Computers Blogs Top programming blogs

   sayaç Powered by WordPress | Theme by NeoEase | Valid XHTML 1.1 and CSS 3 Yukarı