top of page
Ara

Formda Dizi Kullanarak Giotin Yapımı

  • sametmedyadestek
  • 21 Ara 2015
  • 1 dakikada okunur

Dizi Kullanarak 10 Tane İsimden Durdura Tıklandıgında Bir İsim Seçiliyor Burda Hem Timer hem ,Random ,Hem Renk Kodlarını,Hemde Kodla Label Nasıl GÖsteriliyor Onu Öğreniyoruz ...

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 WFA_Giotin { public partial class Form1 : Form { public Form1() { InitializeComponent(); } string[] sinifListesi = {"Furkan", "Ali", "Burak", "Mustafa", "Ali", "SametMedya.com", "Sedat", "Emin", "Muhammet", "Ekrem" }; private void Form1_Load(object sender, EventArgs e) { timer1.Start(); } Random rnd = new Random(); private void timer1_Tick(object sender, EventArgs e) { int index = rnd.Next(0, 10); lblIsim.Text = sinifListesi[index]; lblIsim.ForeColor = Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)); }

private void btnDurdur_Click(object sender, EventArgs e) { timer1.Stop(); } } }

Comentários


Tanıtılan Yazılar
Son Paylaşımlar
Arşiv
Etiketlere Göre Ara
Bizi Takip Edin
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page