IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   Visual Basic (https://www.ircforumlari.net/visual-basic/)
-   -   VB Ytl Uyum Çalışması (https://www.ircforumlari.net/visual-basic/600442-vbulletin-ytl-uyum-calismasi.html)

Swat 11 Temmuz 2014 10:59

VB Ytl Uyum Çalışması
 
Projemize 3 adet text ve 1 adet command ekleyip aşağıda ki kodları yazalım

Kod:


 
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



Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 13:32.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk