Hazır Program

Anasayfa Programlama Visual Basic VB Ytl Uyum Çalışması


VB Ytl Uyum Çalışması

E-posta Yazdır

projemize 3 adet text ve 1 adet command ekleyip aşağıda ki kodları yazalım

Public Function dblRoundOff(ByVal x As Double, ByVal N As Integer) As Double
       dblRoundOff = CDbl(Int((x * 10 ^ N) + 0.5) / 10 ^ N)
    End Function


Private Sub Command1_Click()
t1 = Round((Text1 * 10000), 2) * 100
t1 = dblRoundOff(t1, 2)
t2 = Round((Text2 * 10000), 2) * 100
t2 = dblRoundOff(t2, 2)
t3 = Val(t1) + Val(t2)
t4 = (Round((Val(t3) / 10000), 2) / 100)
t4 = dblRoundOff(t4, 2)
Text3.Text = t4
Text3.Text = Format(Text3.Text, "###,###.00 YTL")
Text1.Text = Format(Text1.Text, "###,###.00 YTL")
Text2.Text = Format(Text2.Text, "###,###.00 YTL")
End Sub

Private Sub Text1_GotFocus()
If Text3.Text <> "" Then
Text1 = ""
Text2 = ""
Text3 = ""
End If
End Sub

Private Sub Text2_GotFocus()
If Text3.Text <> "" Then
Text1 = ""
Text2 = ""
Text3 = ""
End If
End Sub

Yorumlar
Yeni Ekle Ara
+/-
Yorum yaz
Adınız:
E-posta:
 
Web Sayfas1:
Başlık:
UBB Kodu:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 
Lütfen resimdeki güvenlik kodunu giriniz.

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Son Güncelleme ( Cuma, 03 Nisan 2009 00:16 )  

Üye Giriş Formu



Kimler Çevrimiçi

Yok