8 Temmuz 2013 Pazartesi
C Sharp Uygulamalar Doğru Denkleminin 0 ile 100 arasındaki X Değerlerine Göre Y Değerini Hesaplama
KONU : C Sharp Uygulamalar - C Sharp ( C# ) formda birinci derece denkleminin katsayılarını girerek 0 ile 100 arasındaki x değerleri için y değerini hesaplama.
C Sharp Form Uygulamalar Kaynak Kodlar Bölüm 17
C Sharp Form Uygulamalar Form Kenarları Arasında Hareket Eden Buton Kontrolü
KONU : C Sharp Uygulamalar - C Sharp ( C# ) formun kenarları arasında rastgele hareket eden buton kontrolü uygulaması.
ETİKETLER: C sharp buton - c sharp timer - c sharp form- c sharp buton hareketi - c# timer - c# button - c# buton hareketi - c sharp buton hareket ettirme - c# buton hareket ettirme - c sharp button left - c sharp button top - csharp timer - csharp timer kullanımı
UYGULAMAYI İNDİR
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace DortDonenButon
{
public partial class Form1 : Form
{
int xArtis = 9, yArtis = 9;
Point yeniNokta;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
yeniNokta = new Point(button1.Location.X,button1.Location.Y);
//butona tıklandıktan sonra buton hareket etmeye başlasın
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
//timer tick olayı gerçekleştiğinde buton hareket yönünde 9 birim ilerlesin
yeniNokta.X += xArtis;
yeniNokta.Y += yArtis;
button1.Location = yeniNokta;
if (button1.Left <= 0 || button1.Location.X >= this.ClientSize.Width - button1.Width)
{
xArtis *= -1;
}
if (button1.Top <= 0 || button1.Location.Y >= this.ClientSize.Height - button1.Height)
{
yArtis *= -1;
}
}
}
}
C Sharp Form Uygulamalar Tam EkranEkran Koruyucu Yapma
KONU : C Sharp Uygulamalar ( C# ) form da dinamik grafik sınıfını kullanarak ekran koruyucu yapma, c# da ekran koruyucu yapmak, Grafik nesnesini kullanarak c sharp da ekran koruyucu yapmak
ETİKETLER: csharp ekran koruyucu - C# ekran koruyucu - ekran koruyucu indir - ekran koruyucu - ekran koruyucu programı - ekran koruyucu yapma - ekran koruyucu uygulama - ekran koruyucu uygulaması - ekran koruyucu örnekleri
UYGULAMAYI İNDİR
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Ekrankoruyucu
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
g = this.CreateGraphics();
}
string[] isimler={"onur","ECE","Fatih","hakan","ismet","ebru"};
Random rdm = new Random();
Color[] renkler = { Color.Black, Color.Yellow, Color.Tomato, Color.SpringGreen, Color.Maroon };
PointF nokta = new PointF();
Font yazi = new Font("Verdana", 20, FontStyle.Italic);
private void Form1_Load(object sender, EventArgs e)
{
}
//grafik nesnesini ekrana rastgele yazı yazdırmak için kullanacağım
Graphics g = null;
private void timer1_Tick(object sender, EventArgs e)
{
string isim=isimler[rdm.Next(0,isimler.Length)];
float yaziGenisligi=g.MeasureString(isim,yazi).Width;
float yaziYuksekligi = g.MeasureString(isim, yazi).Height;
nokta.X = rdm.Next(10,Convert.ToInt16(this.ClientSize.Width-yaziGenisligi));
nokta.Y = rdm.Next(10, Convert.ToInt16(this.ClientSize.Height - yaziYuksekligi));
Color renk=renkler[rdm.Next(0,renkler.Length)];
g.DrawString(isim, yazi, new SolidBrush(renk), nokta);
}
private void çıkışToolStripMenuItem_Click(object sender, EventArgs e)
{
// sağ tıklayınca meu strip açılsın ve çıkış seçeneği aktif olsun
this.Close();
}
private void Form1_MouseClick(object sender, MouseEventArgs e)
{
//ekran üzerinde mouse a sağ tıklanınca menustring görünür olsun
if (e.Button == MouseButtons.Right)
contextMenuStrip1.Visible = true;
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyCode == Keys.F4)
e.Handled = true;
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
// if (e.CloseReason == CloseReason.TaskManagerClosing || e.CloseReason == CloseReason.UserClosing)
// e.Cancel = true;
if (e.CloseReason == CloseReason.TaskManagerClosing)
e.Cancel = true;
}
}
}
C Sharp Form Uygulamalar Faktöriyel Hesaplama
KONU : C Sharp Uygulamalar - C Sharp ( C# ) form faktöriyel hesaplama. C# form iterative faktöriyel hesaplama örneği.
ETİKETLER: c sharp faktöriyel - c sharp faktöriyel hesaplama - c sharp faktöriyel alma - c sharp da faktöriyel - faktöriyel hesaplama - faktöriyel hesaplama programı - faktöriyel hesaplama c# - faktöriyel hesaplama c - faktöriyel hesaplama c sharp - c# form faktöriyel hesaplama - c# faktöriyel hesaplama - faktöriyel alma c# - faktöriyel alma c sharp - faktöriyel alma
UYGULAMAYI İNDİR
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace Faktöriyel
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox txtSonuc;
private System.Windows.Forms.Button btnFaktoriyelHesaplama;
private System.Windows.Forms.Label lblSayi;
private System.Windows.Forms.Button txtFaktoriyelSonuc;
private System.Windows.Forms.Label lblSonuc;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.txtSonuc = new System.Windows.Forms.TextBox();
this.btnFaktoriyelHesaplama = new System.Windows.Forms.Button();
this.lblSayi = new System.Windows.Forms.Label();
this.txtFaktoriyelSonuc = new System.Windows.Forms.Button();
this.lblSonuc = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// txtSonuc
//
this.txtSonuc.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtSonuc.Location = new System.Drawing.Point(93, 64);
this.txtSonuc.Name = "txtSonuc";
this.txtSonuc.Size = new System.Drawing.Size(187, 20);
this.txtSonuc.TabIndex = 0;
//
// btnFaktoriyelHesaplama
//
this.btnFaktoriyelHesaplama.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnFaktoriyelHesaplama.Location = new System.Drawing.Point(93, 90);
this.btnFaktoriyelHesaplama.Name = "btnFaktoriyelHesaplama";
this.btnFaktoriyelHesaplama.Size = new System.Drawing.Size(187, 23);
this.btnFaktoriyelHesaplama.TabIndex = 1;
this.btnFaktoriyelHesaplama.Text = "Hesapla";
this.btnFaktoriyelHesaplama.Click += new System.EventHandler(this.btnFaktoriyelHesapla_Click);
//
// label2
//
this.lblSayi.AutoSize = true;
this.lblSayi.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
this.lblSayi.ForeColor = System.Drawing.Color.Firebrick;
this.lblSayi.Location = new System.Drawing.Point(11, 123);
this.lblSayi.Name = "label2";
this.lblSayi.Size = new System.Drawing.Size(76, 19);
this.lblSayi.TabIndex = 3;
this.lblSayi.Text = "Sonuç = ";
//
// txtFaktoriyelSonuc
//
this.txtFaktoriyelSonuc.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
this.txtFaktoriyelSonuc.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
this.txtFaktoriyelSonuc.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.txtFaktoriyelSonuc.Location = new System.Drawing.Point(93, 119);
this.txtFaktoriyelSonuc.Name = "txtFaktoriyelSonuc";
this.txtFaktoriyelSonuc.Size = new System.Drawing.Size(187, 23);
this.txtFaktoriyelSonuc.TabIndex = 4;
this.txtFaktoriyelSonuc.Text = "0";
//
// label1
//
this.lblSonuc.AutoSize = true;
this.lblSonuc.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
this.lblSonuc.ForeColor = System.Drawing.Color.Firebrick;
this.lblSonuc.Location = new System.Drawing.Point(12, 65);
this.lblSonuc.Name = "label1";
this.lblSonuc.Size = new System.Drawing.Size(52, 19);
this.lblSonuc.TabIndex = 5;
this.lblSonuc.Text = "Sayı :";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.Add(this.lblSonuc);
this.Controls.Add(this.txtFaktoriyelSonuc);
this.Controls.Add(this.lblSayi);
this.Controls.Add(this.btnFaktoriyelHesaplama);
this.Controls.Add(this.txtSonuc);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
this.Text = "Faktoriyel Hesaplama";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void btnFaktoriyelHesapla_Click(object sender, System.EventArgs e)
{
try
{
double faktoriyelSonuc, counter, girilenSayi;
//girilen değeri double tipine çevirelim. Eğer girilen değer double tipine
//çevrilemezse işlem catch bloğuna atlayıp programdan çıkacak
girilenSayi = Convert.ToDouble(txtSonuc.Text);
counter = 1;
faktoriyelSonuc = 1;
//1 den başlayarak girilen sayıya kadar bütün sayıların çarpımını hesaplayarak
//girilen sayının faktoriyelini hesaplayalım
while (counter <= girilenSayi)
{
faktoriyelSonuc = faktoriyelSonuc * counter;
counter = counter + 1;
}
//Hesaplan faktoriyel değerini sonuç kutusuna yazdıralım
txtFaktoriyelSonuc.Text = Convert.ToString(faktoriyelSonuc);
}
catch (Exception)
{
MessageBox.Show("Bir Sayı girmelisiniz...", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
C Sharp Form Uygulamalar Hesap Makinesi Yapımı - Dört İşlem
KONU : C Sharp ( C# ) form uygulamalar hesap makinesi yapma, iki textbox girişi kullanarak hesap makinesi yapma, toplama, çıkarma, bölme ,çarpa,sin ve cos değerlerini hesaplama ve kapama fonksiyonu olan hesap makinesi yapma.
ETİKETLER : c sharp hesap makinesi - c sharp hesap makinesi örneği - c sharp hesap makinesi indir - c sharp hesap makinesi yapma - c sharp hesap makinesi kodları - c sharp hesap makinesi kodu - c# hesap makinesi - c# hesap makinesi kodu - c# hesap makinesi örneği - c# hesap makinesi indir - c# hesap makinesi yapımı - c# hesap makinesi yapımı - c sharp hesap makinesi yapımı
UYGULAMAYI İNDİR
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace HESAPMAKINESI
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label lblIslem;
private System.Windows.Forms.Label lblSonuc;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private Label label4;
private Button button8;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
///
/// The main entry point for the application.
///
private void button1_Click(object sender, System.EventArgs e)
{
try
{
double birinci_sayi, ikinci_sayi, sonuc;
birinci_sayi = Convert.ToDouble(textBox1.Text);
ikinci_sayi = Convert.ToDouble(textBox2.Text);
sonuc = birinci_sayi + ikinci_sayi;
lblSonuc.Text = sonuc.ToString();
lblIslem.Text = "+";
}
catch { }
}
private void button2_Click(object sender, System.EventArgs e)
{
try
{
double s1, s2, s3;
s1 = Convert.ToDouble(textBox1.Text);
s2 = Convert.ToDouble(textBox2.Text);
s3 = s1 - s2;
lblSonuc.Text = s3.ToString();
lblIslem.Text = "-";
}
catch { }
}
private void button3_Click(object sender, System.EventArgs e)
{
try
{
double s1, s2, s3;
s1 = Convert.ToDouble(textBox1.Text);
s2 = Convert.ToDouble(textBox2.Text);
s3 = s1 / s2;
lblSonuc.Text = s3.ToString();
lblIslem.Text = "/";
}
catch { }
}
private void button4_Click(object sender, System.EventArgs e)
{
try
{
double s1, s2, s3;
s1 = Convert.ToDouble(textBox1.Text);
s2 = Convert.ToDouble(textBox2.Text);
s3 = s1 * s2;
lblSonuc.Text = s3.ToString();
lblIslem.Text = "*";
}
catch { }
}
private void button5_Click(object sender, System.EventArgs e)
{
try
{
double s1, s2;
s1 = Convert.ToDouble(textBox1.Text);
s2 = Math.Sin(s1);
lblSonuc.Text = s2.ToString();
lblIslem.Text = "Sin";
}
catch { }
}
private void button6_Click(object sender, System.EventArgs e)
{
Close();
}
private void button7_Click(object sender, System.EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
lblIslem.Text = "";
lblSonuc.Text = "";
}
private void Form1_Load(object sender, System.EventArgs e)
{
textBox1.Text = "";
textBox2.Text = "";
lblIslem.Text = "";
lblSonuc.Text = "";
}
private void button8_Click(object sender, EventArgs e)
{
try
{
double s1, s2;
s1 = Convert.ToDouble(textBox1.Text);
s2 = Math.Cos(s1);
lblSonuc.Text = s2.ToString();
lblIslem.Text = "Cos";
}
catch { }
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.lblIslem = new System.Windows.Forms.Label();
this.lblSonuc = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.button8 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(21, 12);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 20);
this.textBox1.TabIndex = 0;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(166, 12);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 20);
this.textBox2.TabIndex = 1;
//
// label1
//
this.lblIslem.Location = new System.Drawing.Point(127, 15);
this.lblIslem.Name = "label1";
this.lblIslem.Size = new System.Drawing.Size(33, 12);
this.lblIslem.TabIndex = 2;
this.lblIslem.Text = "label1";
//
// label2
//
this.lblSonuc.Location = new System.Drawing.Point(312, 15);
this.lblSonuc.Name = "label2";
this.lblSonuc.Size = new System.Drawing.Size(93, 12);
this.lblSonuc.TabIndex = 3;
this.lblSonuc.Text = "label2";
//
// button1
//
this.button1.Location = new System.Drawing.Point(21, 56);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(80, 20);
this.button1.TabIndex = 4;
this.button1.Text = "Topla";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(121, 56);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(80, 20);
this.button2.TabIndex = 5;
this.button2.Text = "Çıkar";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(121, 81);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(80, 20);
this.button3.TabIndex = 6;
this.button3.Text = "Böl";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(21, 81);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(80, 20);
this.button4.TabIndex = 7;
this.button4.Text = "Çarp";
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// button5
//
this.button5.Location = new System.Drawing.Point(222, 56);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(84, 20);
this.button5.TabIndex = 8;
this.button5.Text = "Sin";
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// button6
//
this.button6.Location = new System.Drawing.Point(329, 82);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(80, 20);
this.button6.TabIndex = 9;
this.button6.Text = "OFF";
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// button7
//
this.button7.Location = new System.Drawing.Point(329, 56);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(80, 20);
this.button7.TabIndex = 10;
this.button7.Text = "C";
this.button7.Click += new System.EventHandler(this.button7_Click);
//
// label4
//
this.label4.Location = new System.Drawing.Point(272, 15);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(34, 12);
this.label4.TabIndex = 12;
this.label4.Text = "=";
//
// button8
//
this.button8.Location = new System.Drawing.Point(222, 81);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(84, 20);
this.button8.TabIndex = 13;
this.button8.Text = "Cos";
this.button8.Click += new System.EventHandler(this.button8_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(432, 126);
this.Controls.Add(this.button8);
this.Controls.Add(this.label4);
this.Controls.Add(this.button7);
this.Controls.Add(this.button6);
this.Controls.Add(this.button5);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.lblSonuc);
this.Controls.Add(this.lblIslem);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
this.Text = "HESAP MAKİNESİ";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
}
}
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace HESAPMAKINESI
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label lblIslem;
private System.Windows.Forms.Label lblSonuc;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private Label label4;
private Button button8;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
///
/// The main entry point for the application.
///
private void button1_Click(object sender, System.EventArgs e)
{
try
{
double birinci_sayi, ikinci_sayi, sonuc;
birinci_sayi = Convert.ToDouble(textBox1.Text);
ikinci_sayi = Convert.ToDouble(textBox2.Text);
sonuc = birinci_sayi + ikinci_sayi;
lblSonuc.Text = sonuc.ToString();
lblIslem.Text = "+";
}
catch { }
}
private void button2_Click(object sender, System.EventArgs e)
{
try
{
double s1, s2, s3;
s1 = Convert.ToDouble(textBox1.Text);
s2 = Convert.ToDouble(textBox2.Text);
s3 = s1 - s2;
lblSonuc.Text = s3.ToString();
lblIslem.Text = "-";
}
catch { }
}
private void button3_Click(object sender, System.EventArgs e)
{
try
{
double s1, s2, s3;
s1 = Convert.ToDouble(textBox1.Text);
s2 = Convert.ToDouble(textBox2.Text);
s3 = s1 / s2;
lblSonuc.Text = s3.ToString();
lblIslem.Text = "/";
}
catch { }
}
private void button4_Click(object sender, System.EventArgs e)
{
try
{
double s1, s2, s3;
s1 = Convert.ToDouble(textBox1.Text);
s2 = Convert.ToDouble(textBox2.Text);
s3 = s1 * s2;
lblSonuc.Text = s3.ToString();
lblIslem.Text = "*";
}
catch { }
}
private void button5_Click(object sender, System.EventArgs e)
{
try
{
double s1, s2;
s1 = Convert.ToDouble(textBox1.Text);
s2 = Math.Sin(s1);
lblSonuc.Text = s2.ToString();
lblIslem.Text = "Sin";
}
catch { }
}
private void button6_Click(object sender, System.EventArgs e)
{
Close();
}
private void button7_Click(object sender, System.EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
lblIslem.Text = "";
lblSonuc.Text = "";
}
private void Form1_Load(object sender, System.EventArgs e)
{
textBox1.Text = "";
textBox2.Text = "";
lblIslem.Text = "";
lblSonuc.Text = "";
}
private void button8_Click(object sender, EventArgs e)
{
try
{
double s1, s2;
s1 = Convert.ToDouble(textBox1.Text);
s2 = Math.Cos(s1);
lblSonuc.Text = s2.ToString();
lblIslem.Text = "Cos";
}
catch { }
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.lblIslem = new System.Windows.Forms.Label();
this.lblSonuc = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.button8 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(21, 12);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 20);
this.textBox1.TabIndex = 0;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(166, 12);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 20);
this.textBox2.TabIndex = 1;
//
// label1
//
this.lblIslem.Location = new System.Drawing.Point(127, 15);
this.lblIslem.Name = "label1";
this.lblIslem.Size = new System.Drawing.Size(33, 12);
this.lblIslem.TabIndex = 2;
this.lblIslem.Text = "label1";
//
// label2
//
this.lblSonuc.Location = new System.Drawing.Point(312, 15);
this.lblSonuc.Name = "label2";
this.lblSonuc.Size = new System.Drawing.Size(93, 12);
this.lblSonuc.TabIndex = 3;
this.lblSonuc.Text = "label2";
//
// button1
//
this.button1.Location = new System.Drawing.Point(21, 56);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(80, 20);
this.button1.TabIndex = 4;
this.button1.Text = "Topla";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(121, 56);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(80, 20);
this.button2.TabIndex = 5;
this.button2.Text = "Çıkar";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(121, 81);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(80, 20);
this.button3.TabIndex = 6;
this.button3.Text = "Böl";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(21, 81);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(80, 20);
this.button4.TabIndex = 7;
this.button4.Text = "Çarp";
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// button5
//
this.button5.Location = new System.Drawing.Point(222, 56);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(84, 20);
this.button5.TabIndex = 8;
this.button5.Text = "Sin";
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// button6
//
this.button6.Location = new System.Drawing.Point(329, 82);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(80, 20);
this.button6.TabIndex = 9;
this.button6.Text = "OFF";
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// button7
//
this.button7.Location = new System.Drawing.Point(329, 56);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(80, 20);
this.button7.TabIndex = 10;
this.button7.Text = "C";
this.button7.Click += new System.EventHandler(this.button7_Click);
//
// label4
//
this.label4.Location = new System.Drawing.Point(272, 15);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(34, 12);
this.label4.TabIndex = 12;
this.label4.Text = "=";
//
// button8
//
this.button8.Location = new System.Drawing.Point(222, 81);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(84, 20);
this.button8.TabIndex = 13;
this.button8.Text = "Cos";
this.button8.Click += new System.EventHandler(this.button8_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(432, 126);
this.Controls.Add(this.button8);
this.Controls.Add(this.label4);
this.Controls.Add(this.button7);
this.Controls.Add(this.button6);
this.Controls.Add(this.button5);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.lblSonuc);
this.Controls.Add(this.lblIslem);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
this.Text = "HESAP MAKİNESİ";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
}
}
DİĞER C SHARP UYGULAMALARI |
||
---|---|---|
C Sharp Form Uygulamalar Dört İşlem Hesap Makinesi |
C Sharp Form Uygulamalar Hesap Makinesi Yapımı - Dört İşlem |
C Sharp Uygulamalar Modern Hesap Makinesi |
Etiketler:
Button Sınıfı
,
C sharp uygulamalar
,
Matematik
,
TextBox Sınıfı
,
Tip Dönüşüm Örnekleri
,
Try-Catch Örnekleri
4 Temmuz 2013 Perşembe
C Sharp Konsol Uygulamalar Kaynak Kodlar Bölüm 13
ŞİFRE : c-sharp-uygulamalar |
C Sharp Konsol Uygulamalar Kaynak Kodlar Bölüm 12
ŞİFRE : c-sharp-uygulamalar |
C Sharp Konsol Uygulamalar Kaynak Kodlar Bölüm 11
ŞİFRE : c-sharp-uygulamalar |
3 Temmuz 2013 Çarşamba
C Sharp Form Çarpım Tablosu Oluşturma
KONU : C Sharp Uygulamalar - C Sharp ( C# ) form çarpım tablosu hesaplama uygulaması. Hesaplanan çarpım tablosunu listbox içerinde gösterme
ETİKETLER: c sharp çarpım tablosu - csharp çarpma işlemi - c sharp da çarpım tablosu - c# çarpım tablosu - c# çarpma işlemi - c# çarpım tablosu oluşturma - c# çarpım tablosunu gösterme
UYGULAMAYI İNDİR
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace çarpım_tablosu
{
public partial class Form_Carpim_Tablosu : Form
{
public Form_Carpim_Tablosu()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int i, j;
lstCarpimTablosu.Items.Clear();
for (i = 1; i <= 10; i++)
{
lstCarpimTablosu.Items.Add(Convert.ToString(i) + " ler ");
lstCarpimTablosu.Items.Add("-----------");
for (j = 1; j <= 10; j++)
lstCarpimTablosu.Items.Add(Convert.ToString(i) + 'x' + Convert.ToString(j) + '=' + Convert.ToString(i * j));
}
}
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new Form_Carpim_Tablosu());
}
}
}
C Sharp Form Uygulamalar Dört İşlem Hesap Makinesi
KONU : C Sharp ( C# ) form uygulamalar dört işlem hesap makinesi yapma, iki textbox girişi kullanarak hesap makinesi yapma, toplama, çıkarma, bölme ,çarpma işlemleri olan hesap makinesi yapma.
ETİKETLER : c sharp hesap makinesi - c sharp hesap makinesi örneği - c sharp hesap makinesi indir - c sharp hesap makinesi yapma - c sharp hesap makinesi kodları - c sharp hesap makinesi kodu - c# hesap makinesi - c# hesap makinesi kodu - c# hesap makinesi örneği - c# hesap makinesi indir - c# hesap makinesi yapımı
ETİKETLER:
UYGULAMAYI İNDİR
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace Hesap_Makinesi
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox txtBirinciSayi;
private System.Windows.Forms.TextBox txtIkinciSayi;
private System.Windows.Forms.Label lblOperatör;
private System.Windows.Forms.Button btnTopla;
private System.Windows.Forms.Button btnCikar;
private System.Windows.Forms.Button btnCarp;
private System.Windows.Forms.Button btnBol;
private System.Windows.Forms.Label lblSonucText;
private System.Windows.Forms.Label lblSonuc;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.txtBirinciSayi = new System.Windows.Forms.TextBox();
this.txtIkinciSayi = new System.Windows.Forms.TextBox();
this.lblOperatör = new System.Windows.Forms.Label();
this.btnTopla = new System.Windows.Forms.Button();
this.btnCikar = new System.Windows.Forms.Button();
this.btnCarp = new System.Windows.Forms.Button();
this.btnBol = new System.Windows.Forms.Button();
this.lblSonucText = new System.Windows.Forms.Label();
this.lblSonuc = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// textBox1
//
this.txtBirinciSayi.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtBirinciSayi.ForeColor = System.Drawing.SystemColors.HotTrack;
this.txtBirinciSayi.Location = new System.Drawing.Point(24, 19);
this.txtBirinciSayi.Name = "textBox1";
this.txtBirinciSayi.Size = new System.Drawing.Size(100, 20);
this.txtBirinciSayi.TabIndex = 0;
this.txtBirinciSayi.Text = "0";
//
// textBox2
//
this.txtIkinciSayi.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtIkinciSayi.ForeColor = System.Drawing.SystemColors.HotTrack;
this.txtIkinciSayi.Location = new System.Drawing.Point(160, 19);
this.txtIkinciSayi.Name = "textBox2";
this.txtIkinciSayi.Size = new System.Drawing.Size(100, 20);
this.txtIkinciSayi.TabIndex = 1;
this.txtIkinciSayi.Text = "0";
//
// label2
//
this.lblOperatör.AutoSize = true;
this.lblOperatör.Location = new System.Drawing.Point(136, 22);
this.lblOperatör.Name = "label2";
this.lblOperatör.Size = new System.Drawing.Size(13, 13);
this.lblOperatör.TabIndex = 3;
this.lblOperatör.Text = "_";
this.lblOperatör.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// button1
//
this.btnTopla.ForeColor = System.Drawing.Color.DarkRed;
this.btnTopla.Location = new System.Drawing.Point(48, 59);
this.btnTopla.Name = "button1";
this.btnTopla.Size = new System.Drawing.Size(32, 23);
this.btnTopla.TabIndex = 4;
this.btnTopla.Text = "+";
this.btnTopla.Click += new System.EventHandler(this.btnTopla_Click);
//
// button2
//
this.btnCikar.ForeColor = System.Drawing.Color.DarkRed;
this.btnCikar.Location = new System.Drawing.Point(96, 59);
this.btnCikar.Name = "button2";
this.btnCikar.Size = new System.Drawing.Size(32, 23);
this.btnCikar.TabIndex = 5;
this.btnCikar.Text = "-";
this.btnCikar.Click += new System.EventHandler(this.BtnCikar_Click);
//
// button3
//
this.btnCarp.ForeColor = System.Drawing.Color.DarkRed;
this.btnCarp.Location = new System.Drawing.Point(144, 59);
this.btnCarp.Name = "button3";
this.btnCarp.Size = new System.Drawing.Size(32, 23);
this.btnCarp.TabIndex = 6;
this.btnCarp.Text = "*";
this.btnCarp.Click += new System.EventHandler(this.btnCarp_Click);
//
// button4
//
this.btnBol.ForeColor = System.Drawing.Color.DarkRed;
this.btnBol.Location = new System.Drawing.Point(192, 59);
this.btnBol.Name = "button4";
this.btnBol.Size = new System.Drawing.Size(32, 23);
this.btnBol.TabIndex = 7;
this.btnBol.Text = "/";
this.btnBol.Click += new System.EventHandler(this.btnBol_Click);
//
// label3
//
this.lblSonucText.AutoSize = true;
this.lblSonucText.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
this.lblSonucText.ForeColor = System.Drawing.Color.Maroon;
this.lblSonucText.Location = new System.Drawing.Point(96, 107);
this.lblSonucText.Name = "label3";
this.lblSonucText.Size = new System.Drawing.Size(51, 15);
this.lblSonucText.TabIndex = 8;
this.lblSonucText.Text = "Sonuç : ";
this.lblSonucText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label4
//
this.lblSonuc.AutoSize = true;
this.lblSonuc.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
this.lblSonuc.ForeColor = System.Drawing.Color.Maroon;
this.lblSonuc.Location = new System.Drawing.Point(144, 107);
this.lblSonuc.Name = "label4";
this.lblSonuc.Size = new System.Drawing.Size(14, 15);
this.lblSonuc.TabIndex = 9;
this.lblSonuc.Text = "0";
this.lblSonuc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(292, 147);
this.Controls.Add(this.lblSonuc);
this.Controls.Add(this.lblSonucText);
this.Controls.Add(this.btnBol);
this.Controls.Add(this.btnCarp);
this.Controls.Add(this.btnCikar);
this.Controls.Add(this.btnTopla);
this.Controls.Add(this.lblOperatör);
this.Controls.Add(this.txtIkinciSayi);
this.Controls.Add(this.txtBirinciSayi);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
this.Text = "Hesap Makinesi";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
double sayi1, sayi2;
private void btnTopla_Click(object sender, System.EventArgs e)
{
if (txtBirinciSayi.Text != "" &&
txtIkinciSayi.Text != "")
{
sayi1 = Convert.ToDouble(txtBirinciSayi.Text);
sayi2 = Convert.ToDouble(txtIkinciSayi.Text);
lblSonuc.Text = Convert.ToString(sayi1 + sayi2);
lblOperatör.Text = "+";
}
else lblSonuc.Text = "Hatalı Giriş";
}
private void BtnCikar_Click(object sender, System.EventArgs e)
{
if (txtBirinciSayi.Text != "" &&
txtIkinciSayi.Text != "")
{
sayi1 = Convert.ToDouble(txtBirinciSayi.Text);
sayi2 = Convert.ToDouble(txtIkinciSayi.Text);
lblSonuc.Text = Convert.ToString(sayi1 - sayi2);
lblOperatör.Text = "-";
}
else lblSonuc.Text = "Hatalı Giriş";
}
private void btnCarp_Click(object sender, System.EventArgs e)
{
if (txtBirinciSayi.Text != "" && txtIkinciSayi.Text != "")
{
sayi1 = Convert.ToDouble(txtBirinciSayi.Text);
sayi2 = Convert.ToDouble(txtIkinciSayi.Text);
lblSonuc.Text = Convert.ToString(sayi1 * sayi2);
lblOperatör.Text = "*";
}
else lblSonuc.Text = "Hatalı Giriş";
}
private void btnBol_Click(object sender, System.EventArgs e)
{
if (txtBirinciSayi.Text != "" &&
txtIkinciSayi.Text != "" &&
Convert.ToDouble(txtIkinciSayi.Text) != 0)
{
sayi1 = Convert.ToDouble(txtBirinciSayi.Text);
sayi2 = Convert.ToDouble(txtIkinciSayi.Text);
lblSonuc.Text = Convert.ToString(sayi1 / sayi2);
lblOperatör.Text = "/";
}
else lblSonuc.Text = "Hatalı Giriş";
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
DİĞER C SHARP UYGULAMALARI |
||
---|---|---|
C Sharp Form Uygulamalar Dört İşlem Hesap Makinesi |
C Sharp Form Uygulamalar Hesap Makinesi Yapımı - Dört İşlem |
C Sharp Uygulamalar Modern Hesap Makinesi |
Etiketler:
Button Sınıfı
,
C sharp uygulamalar
,
Form Application Örnekleri
,
ListBox Sınıfı
,
Matematik
Kaydol:
Kayıtlar
(
Atom
)