ComboBox İle 4 İşlem Vb.Net

ComboBox ile 4 İşlem Vb.Net

Bu Programımızda 3 Textbox,1 label,1 buton,1 tanede combobox kullanılmıstır.Gerekli kodlar asagıda yazılıdır

[code language=”vbnet”]

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Select Case ComboBox1.Text
Case "Topla"
TextBox3.Text = Val(TextBox2.Text) + Val(TextBox2.Text)
Case "Cıkar"
TextBox3.Text = Val(TextBox2.Text) – Val(TextBox2.Text)
Case "Carp"
TextBox3.Text = Val(TextBox2.Text) * Val(TextBox2.Text)
Case "Bol"
TextBox3.Text = Val(TextBox2.Text) / Val(TextBox2.Text)
Case Else
MsgBox("lütfen islem seciniz") ‘İslem Secmezse Verilecek Hata

End Select
End Sub
End Class

[/code]

Projeyi İndir

Yorumlar 6

Bir yanıt yazın

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