Zamlı Maaş Hesaplama (CheckBox ile) VB.NET
Zamlı Maaş Hesaplama (CheckBox ile) VB.NET
Aslında bu örneğin RadiButton ile yapılması daha kolay ve mantıklı.Ama gelen istek üzerine CheckBox ile bir örnek hazırladık.Ama ChecBoxların öğrenilmesi açsından güzel bir örnek. RadioButton ile yapılmış örnek için link : http://www.gorselprogramlama.com/zamli-maas-hesaplama-radiobutton-ile-vbnet
Public Class Form1 Dim smaas, zmaas As Single Dim durum As Boolean Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load durum = False End Sub Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged If (durum = False) Then Try smaas = CSng(TextBox1.Text) zmaas = smaas * 1.1 TextBox2.Text = zmaas CheckBox2.Enabled = False CheckBox3.Enabled = False CheckBox4.Enabled = False durum = True Catch ex As Exception End Try Else CheckBox2.Enabled = True CheckBox3.Enabled = True CheckBox4.Enabled = True TextBox2.Text = "" durum = False End If End Sub Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged If (durum = False) Then Try smaas = CSng(TextBox1.Text) zmaas = smaas * 1.12 TextBox2.Text = zmaas CheckBox1.Enabled = False CheckBox3.Enabled = False CheckBox4.Enabled = False durum = True Catch ex As Exception End Try Else CheckBox1.Enabled = True CheckBox3.Enabled = True CheckBox4.Enabled = True TextBox2.Text = "" durum = False End If End Sub Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged If (durum = False) Then Try smaas = CSng(TextBox1.Text) zmaas = smaas * 1.18 TextBox2.Text = zmaas CheckBox1.Enabled = False CheckBox3.Enabled = False CheckBox2.Enabled = False durum = True Catch ex As Exception End Try Else CheckBox1.Enabled = True CheckBox3.Enabled = True CheckBox2.Enabled = True TextBox2.Text = "" durum = False End If End Sub Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged If (durum = False) Then Try smaas = CSng(TextBox1.Text) zmaas = smaas * 1.15 TextBox2.Text = zmaas CheckBox1.Enabled = False CheckBox2.Enabled = False CheckBox4.Enabled = False durum = True Catch ex As Exception End Try Else CheckBox1.Enabled = True CheckBox2.Enabled = True CheckBox4.Enabled = True TextBox2.Text = "" durum = False End If End Sub End Class
Projeyi İNDİR
Rica: Sitemizin Google'da Ön Sıralarda Çıkması İçin Lütfen Alttaki Google+ Butonuna Tıklayınız , Sayfamızı Facebookta Beğeniniz veya yazıları Twitter,Facebookta paylaşınız.









Son Yorumlar