Arama butonu
Bu konudaki kullanıcılar: 1 misafir
1
Cevap
78
Tıklama
0
Öne Çıkarma
Visual Studio 2002 Preview Kod Yardım
G
3 ay
Yarbay

K
3 ay
Er
Konu Sahibi

Öncelikle herkese merhaba Visual Studio 2022 Preview de şöyle bir program yapmak istiyorum fakat butonda takıldım ve düzeltmeye çalıştıkça dahada karmaşık bir hale gelmeye başladı program şu şekilde
< Resime gitmek için tıklayın >
kod şu şekilde



Private Sub Hesapla_Click(Of sender As Object, e As EventArgs, toplam3 As Object, toplam4 As Object, fiyat4 As Object, adet4 As Object, genetoplam As Decimal, geneltoplam As Decimal)() Handles hesapla.click
  ' Değişkenler
  Dim adet, fiyat, toplam As Decimal

  Dim adet1 As Object = Nothing
  ' 1. ürün
  Decimal.TryParse(adet1.Text, adet)
  Dim fiyat1 As Object = Nothing
  Decimal.TryParse(fiyat1.Text, fiyat)
  toplam = adet * fiyat
  Dim toplam1 As Object = Nothing
  toplam1.Text = toplam.ToString("N2")
  geneltoplam += toplam

  Dim adet2 As Object = Nothing
  ' 2. ürün
  Decimal.TryParse(adet2.Text, adet)
  Dim fiyat2 As Object = Nothing
  Decimal.TryParse(fiyat2.Text, fiyat)
  toplam = adet * fiyat
  Dim toplam2 As Object = Nothing
  toplam2.Text = toplam.ToString("N2")
  geneltoplam += toplam

  Dim adet3 As Object = Nothing
  ' 3. ürün
  Decimal.TryParse(adet3.Text, adet)
  Dim fiyat3 As Object = Nothing
  Decimal.TryParse(fiyat3.Text, fiyat)
  toplam = adet * fiyat
  toplam3.Text = toplam.ToString("N2")
  geneltoplam += toplam

  ' 4. ürün
  Decimal.TryParse(adet4.Text, adet)
  Decimal.TryParse(fiyat4.Text, fiyat)
  toplam = adet * fiyat
  toplam4.Text = toplam.ToString("N2")
  geneltoplam += toplam

  Dim adet5 As Object = Nothing
  ' 5. ürün
  Dim v = Decimal.TryParse(adet5.Text, adet)
  Dim fiyat5 As Object = Nothing
  Decimal.TryParse(fiyat5.Text, fiyat)
  toplam = adet * fiyat
  Dim toplam5 As Object = Nothing
  toplam5.Text = toplam.ToString("N2")
  geneltoplam += toplam
  CDec(0).Text = CDec(0).ToString("N2")
End Sub

DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.

Üye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.

Üye Ol Şimdi Değil




DH Mobil uygulaması ile devam edin. Mobil tarayıcınız ile mümkün olanların yanı sıra, birçok yeni ve faydalı özelliğe erişin. Gizle ve güncelleme çıkana kadar tekrar gösterme.