12.07.2015 Views

bu döküman kaan aslan tarafından c ve sistem ... - Kitabxana

bu döküman kaan aslan tarafından c ve sistem ... - Kitabxana

bu döküman kaan aslan tarafından c ve sistem ... - Kitabxana

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

class MyForm : Form{private TextBox m_textBoxName;private Button m_<strong>bu</strong>ttonOK;public MyForm(){m_textBoxName = new TextBox();m_textBoxName.Location = new Point(100, 100);m_<strong>bu</strong>ttonOK = new Button();m_<strong>bu</strong>ttonOK.Text = "&Ok";m_<strong>bu</strong>ttonOK.Location = new Point(160, 140);m_<strong>bu</strong>ttonOK.Click += new E<strong>ve</strong>ntHandler(<strong>bu</strong>ttonOKClickHandler);this.Controls.AddRange(new Control[] { m_<strong>bu</strong>ttonOK, m_textBoxName });}private void <strong>bu</strong>ttonOKClickHandler(object sender, E<strong>ve</strong>ntArgs ea){MessageBox.Show(m_textBoxName.Text);}}}TextBox Control ünün bool türden multiLine property elemanı control ü çok satırlı mod a geçirmekiçin kullanılabilir. Bu property nin default durumu false dur. Yani control tek satırlıdır.Control ün int türden maxLength property si TextBoxBase sınıfından gelmektedir. Control e girecekkarakter sayısını sınırlamakta kullanılır. Control ün bool türden readOnly property si programı ReadOnly mod a geçirmekte kullanılır. Bu property nin default değeri false biçimdedir. Yani propertyread only değildir.ReadOnly Text Box a klavye ile yazı girilemez fakat text property si yoluyla yazı girilebilir.Control ün ScrollBars isimli property elemanı çok satırlı durumda etkili olur. Bu propertyScrollBars isimli enum türündendir. Default durumu scrollBars.none biçimindedir.using System;using System.Windows.Forms;using System.Drawing;namespace CSD{class App{public static void Main(){Application.Run(new MyForm());49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!