Yuvarlama İşlemi örnek VB.Net

 Öncelikle yapacağımız programın ara yüzünü aşağıda  ki gibi düzenleyelim.

resim1

10 tane radiobutton , 2 tane textbox , 1 button ve 3 label ekledik.

Şimdi Button1 ‘in içine aşağıdaki kodları yazalım.
[code language=”vb”]If RadioButton1.Checked Then TextBox2.Text = Math.Round(Convert.ToDouble(TextBox1.Text), 1)
If RadioButton2.Checked Then TextBox2.Text = Math.Round(Convert.ToDouble(TextBox1.Text), 2)
If RadioButton3.Checked Then TextBox2.Text = Math.Round(Convert.ToDouble(TextBox1.Text), 3)
If RadioButton4.Checked Then TextBox2.Text = Math.Round(Convert.ToDouble(TextBox1.Text), 4)
If RadioButton5.Checked Then TextBox2.Text = Math.Round(Convert.ToDouble(TextBox1.Text), 5)
If RadioButton6.Checked Then TextBox2.Text = Math.Round(Convert.ToDouble(TextBox1.Text), 6)
If RadioButton7.Checked Then TextBox2.Text = Math.Round(Convert.ToDouble(TextBox1.Text), 7)
If RadioButton8.Checked Then TextBox2.Text = Math.Round(Convert.ToDouble(TextBox1.Text), 8 )
If RadioButton9.Checked Then TextBox2.Text = Math.Round(Convert.ToDouble(TextBox1.Text), 9)
If RadioButton10.Checked Then TextBox2.Text = Math.Round(Convert.ToDouble(TextBox1.Text), 10)[/code]

 

Projeyi İndir: Yuvarlama İşlemi VB.Net

Yorumlar 6

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir