| ||
| | #1 |
| rca bilimsel hesap makinesi Bu program bilimsel bir hesap makinesidir.Kodları aşağıda verilmiştir programa [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] linkinden ulaşabilirsiniz.Programda 40 tane command buton ve 1 tane text butonu vardır arabirimi oluşturup kodları yazınız . Dim a, b, c, d As Double Private Sub Command1_Click() Text1.Text = Text1.Text & 1 End Sub Private Sub Command10_Click() Text1.Text = Text1.Text & 7 End Sub Private Sub Command11_Click() Text1.Text = Text1.Text & 6 End Sub Private Sub Command12_Click() Text1.Text = Text1.Text & 5 End Sub Private Sub Command13_Click() Text1.Text = "" Text1.SetFocus End Sub Private Sub Command17_Click() If Text1.Text = "" Then MsgBox "Lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else If a <> 0 Then b = Text1.Text d = Val(a) + Val(b) Text1 = d b = "0" a = "0" If d <> 0 Then d = Val(d) + Val(Text1) Else a = Text1.Text Label1.Caption = "+" Text1.Text = "" Text1.SetFocus End If End If End Sub Private Sub Command14_Click() If Text1.Text = "" Then MsgBox "Lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else If a <> 0 Then b = Text1.Text d = Val(a) / Val(b) Text1 = d b = "0" a = "0" If d <> 0 Then d = Val(d) / Val(Text1) Else a = Text1.Text Label1.Caption = "/" Text1.Text = "" Text1.SetFocus End If End If End Sub Private Sub Command20_Click() If Text1.Text = "" Then MsgBox "Lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else If a <> 0 Then b = Text1.Text d = Val(a) Mod Val(b) Text1 = d b = "0" a = "0" If d <> 0 Then d = Val(d) Mod Val(Text1) Else a = Text1.Text Label1.Caption = "Bölümden Kalan" Text1.Text = "" Text1.SetFocus End If End If End Sub Private Sub Command26_Click() If Text1 = "" Or Text1 = "0" Or Text1 < "0" Then MsgBox "Lütfen pozitif bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Text1 = "" Else a = Text1.Text b = Log(a) / Log(10) Text1.Text = b End If End Sub Private Sub Command27_Click() If (Text1.Text = "") Or (Text1.Text = "0") Or (Text1.Text < "0") Then MsgBox "Lütfen pozitif bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Text1 = "" Else a = Text1.Text b = Log(a) Text1.Text = b End If End Sub Private Sub Command28_Click() If (Text1.Text = "") Or (Text1.Text = "0") Or (Text1.Text < "0") Then MsgBox "Lütfen pozitif bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Text1 = "" Else a = Text1.Text b = Log(a) / Log(10) Text1.Text = b a = Text1.Text b = Exp(a) Text1.Text = b End If End Sub Private Sub Command29_Click() If Text1 = "" Then MsgBox "lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else If Option1.Value = True Then a = Cos(Text1) Text1 = Round(a, 14) End If If Option2.Value = True Then b = 3.14159265358979 / 180 a = Cos(Val(Text1) * b) Text1 = Round(a, 14) End If If Option3.Value = True Then a = Text1 * 3.14159265358979 / 200 b = Cos(a) Text1 = Round(b, 14) End If If (Option1.Value = True) And (Option2.Value = False) And (Option3.Value = False) Or (Option1.Value = False) And (Option2.Value = True) And (Option3.Value = False) Or (Option1.Value = False) And (Option2.Value = False) And (Option3.Value = True) Then Exit Sub Else MsgBox "Lütfen bir seçim yapınız.", vbExclamation + vbOKOnly, "Uyarı" End If End If End Sub Private Sub Command30_Click() If Text1 = "" Then MsgBox "lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else If Option1.Value = True Then a = Sin(Text1) Text1 = Round(a, 14) End If If Option2.Value = True Then b = 3.14159265358979 / 180 a = Sin(Val(Text1) * b) Text1 = Round(a, 14) End If If Option3.Value = True Then a = Text1 * 3.14159265358979 / 200 b = Sin(a) Text1 = Round(b, 14) End If If (Option1.Value = True) And (Option2.Value = False) And (Option3.Value = False) Or (Option1.Value = False) And (Option2.Value = True) And (Option3.Value = False) Or (Option1.Value = False) And (Option2.Value = False) And (Option3.Value = True) Then Exit Sub Else MsgBox "Lütfen bir seçim yapınız.", vbExclamation + vbOKOnly, "Uyarı" End If End If End Sub Private Sub Command31_Click() If Text1 = "" Then MsgBox "lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else If Option1.Value = True Then a = Tan(Text1) Text1 = Round(a, 14) End If If Option2.Value = True Then b = 3.14159265358979 / 180 a = Tan(Val(Text1) * b) Text1 = Round(a, 14) End If If Option3.Value = True Then a = Text1 * 3.14159265358979 / 200 b = Tan(a) Text1 = Round(b, 14) End If If (Option1.Value = True) And (Option2.Value = False) And (Option3.Value = False) Or (Option1.Value = False) And (Option2.Value = True) And (Option3.Value = False) Or (Option1.Value = False) And (Option2.Value = False) And (Option3.Value = True) Then Exit Sub Else MsgBox "Lütfen bir seçim yapınız.", vbExclamation + vbOKOnly, "Uyarı" End If End If End Sub Private Sub Command32_Click() If Text1 = "" Then MsgBox "lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else If Option1.Value = True Then a = Atn(Text1) Text1 = Round(a, 14) End If If Option2.Value = True Then b = 3.14159265358979 / 180 a = Atn(Val(Text1) * b) Text1 = Round(a, 14) End If If Option3.Value = True Then a = Text1 * 3.14159265358979 / 200 b = Atn(a) Text1 = Round(b, 14) End If If (Option1.Value = True) And (Option2.Value = False) And (Option3.Value = False) Or (Option1.Value = False) And (Option2.Value = True) And (Option3.Value = False) Or (Option1.Value = False) And (Option2.Value = False) And (Option3.Value = True) Then Exit Sub Else MsgBox "Lütfen bir seçim yapınız.", vbExclamation + vbOKOnly, "Uyarı" End If End If End Sub Private Sub Command33_Click() If Text1.Text = "" Then MsgBox "Lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else Text1.Text = Text1.Text * -1 End If End Sub Private Sub Command34_Click() If Text1.Text = "" Then MsgBox "lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else a = Text1.Text b = 1 For i = 1 To a b = b * i Next Text1.Text = b End If End Sub Private Sub Command35_Click() If (Text1.Text = "") Or (Text1.Text = "0") Or (Text1.Text < "0") Then MsgBox "Lütfen pozitif bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Text1 = "" Else a = Text1.Text b = Exp(a) Text1.Text = b End If End Sub Private Sub Command36_Click() If Text1 = "" Then MsgBox "lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else If Option1.Value = True Then a = 1 / Tan(Text1) Text1 = Round(a, 14) End If If Option2.Value = True Then b = 3.14159265358979 / 180 a = 1 / Tan(Val(Text1) * b) Text1 = Round(a, 14) End If If Option3.Value = True Then b = 3.14159265358979 / 200 a = 1 / Tan(Val(Text1) * b) Text1 = Round(a, 14) End If If (Option1.Value = True) And (Option2.Value = False) And (Option3.Value = False) Or (Option1.Value = False) And (Option2.Value = True) And (Option3.Value = False) Or (Option1.Value = False) And (Option2.Value = False) And (Option3.Value = True) Then Exit Sub Else MsgBox "Lütfen bir seçim yapınız.", vbExclamation + vbOKOnly, "Uyarı" End If End If End Sub Private Sub Command37_Click() If Text1.Text = "" Then MsgBox "Lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else a = Text1.Text b = Val(a) ^ 3 Text1.Text = b Text1.SetFocus End If End Sub Private Sub Command38_Click() If Text1.Text = "" Then MsgBox "Lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else If a <> 0 Then b = Text1.Text d = Str(Val(a) * Val(b)) d = d / 100 Text1 = d b = "0" a = "0" If d <> 0 Then d = Val(d) + Val(Text1) Else a = Text1.Text Label1.Caption = "Yüzde" Text1.Text = "" Text1.SetFocus End If End If End Sub Private Sub Command39_Click() If Text1.Text = "" Then MsgBox "Lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else a = Text1.Text b = Val(a) * 18 / 100 Text1.Text = b Text1.SetFocus End If End Sub Private Sub Command40_Click() If Text1.Text = "" Then MsgBox "Lütfen ilk önce üssü alınacak sayıyı ve sonra üssü'nü girinz.", vbExclamation + vbOKOnly, "Bildiri" Else If a <> 0 Then b = Text1.Text d = Val(a) ^ Val(b) Text1 = d b = "0" a = "0" If d <> 0 Then d = Val(d) + Val(Text1) Else a = Text1.Text Label1.Caption = "Üssü" Text1.Text = "" Text1.SetFocus End If End If End Sub Private Sub Command6_Click() If Text1.Text = "" Then MsgBox "Lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else If a <> 0 Then b = Text1.Text d = Val(a) * Val(b) Text1 = d b = "0" a = "0" If d <> 0 Then d = Val(d) * Val(Text1) Else a = Text1.Text Label1.Caption = "*" Text1.Text = "" Text1.SetFocus End If End If End Sub Private Sub Command7_Click() If Text1.Text = "" Then MsgBox "Lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else If a <> 0 Then b = Text1.Text d = Val(a) - Val(b) Text1 = d b = "0" a = "0" If d <> 0 Then d = Val(d) - Val(Text1) Else a = Text1.Text Label1.Caption = "-" Text1.Text = "" Text1.SetFocus End If End If End Sub Private Sub Command18_Click() If Text1 = "" Then MsgBox "Lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else a = Text1.Text b = Val(a) * Val(a) Text1.Text = b Text1.SetFocus End If End Sub Private Sub Command15_Click() b = Text1.Text If a = 0 Then MsgBox "Gereksiz yere eşittir butonuna basmayınız", vbExclamation + vbOKOnly, "Uyarı" If a <> 0 Then If (Label1.Caption = "+") Then Text1.Text = Val(a) + Val(b) a = "0" Else If a = 0 Then MsgBox "Gereksiz yere eşittir butonuna basmayınız", vbExclamation + vbOKOnly, "Uyarı" If a <> 0 Then If (Label1.Caption = "-") Then Text1.Text = Val(a) - Val(b) a = "0" Else If a = 0 Then MsgBox "Gereksiz yere eşittir butonuna basmayınız", vbExclamation + vbOKOnly, "Uyarı" If a <> 0 Then If (Label1.Caption = "/") Then Text1.Text = Val(a) / Val(b) a = "0" Else If a = 0 Then MsgBox "Gereksiz yere eşittir tuşuna basmayınız", vbExclamation + vbOKOnly, "Uyarı" If a <> 0 Then If (Label1.Caption = "*") Then Text1.Text = Val(a) * Val(b) a = "0" Else If a = 0 Then MsgBox "Gereksiz yere eşittir tuşuna basmayınız", vbExclamation + vbOKOnly, "Uyarı" If a <> 0 Then If (Label1.Caption = "Bölümden Kalan") Then Text1.Text = Val(a) Mod Val(b) a = "0" Else If a = 0 Then MsgBox "Gereksiz yere eşittir tuşuna basmayınız", vbExclamation + vbOKOnly, "Uyarı" If a <> 0 Then If (Label1.Caption = "Yüzde") Then Text1.Text = Val(a) * Val(b) Text1.Text = Val(Text1.Text) / 100 a = "0" Else If a = 0 Then MsgBox "Gereksiz yere eşittir butonuna basmayınız", vbExclamation + vbOKOnly, "Uyarı" If a <> 0 Then If (Label1.Caption = "Üssü") Then Text1.Text = Val(a) ^ Val(b) a = "0" End If End If End If End If End If End If End If End If End If End If End If End If End If End If End Sub Private Sub Command16_Click() Text1.Text = Text1.Text & 0 End Sub Private Sub Command19_Click() If Text1.Text = "" Then MsgBox "Lütfen bir sayı giriniz.", vbExclamation + vbOKOnly, "Uyarı" Else a = Text1.Text b = Sqr(a) Text1.Text = b End If End Sub Private Sub Command2_Click() Text1.Text = Text1.Text & 2 End Sub Private Sub Command21_Click() a = Text1.Text Text1 = "3.1415926535897932384626433832795" Label1.Caption = "pi" End Sub Private Sub Command22_Click() mesaj = MsgBox("Hesap Makinesinden Çıkmak İstiyormusunuz?", vbYesNo + vbQuestion, "Hesap Makinesi") If mesaj = vbNo Then Form1.Show Else End End If End Sub Private Sub Command23_Click() If Text1 = "" Then Exit Sub Dim s As String s = Text1.Text Text1.Text = s - 1 End Sub Private Sub Command24_Click() If Text1 = "" Then Exit Sub Dim s As String s = Text1.Text Text1.Text = s + 1 End Sub Private Sub Command25_Click() a = "0" b = "0" Text1.Text = "" Label1.Caption = "İşlem" Option1 = False Option2 = False Option3 = False Text1.SetFocus End Sub Private Sub Command3_Click() Text1.Text = Text1.Text & 3 End Sub Private Sub Command4_Click() Text1.Text = Text1.Text & 4 End Sub Private Sub Command5_Click() If Text1.Text = "" Then MsgBox "Bir sayı girmeden virgül koyamasınız.", vbExclamation + vbOKOnly, "Uyarı" Else If InStr(Text1.Text, ",") Then Exit Sub Text1.Text = Text1.Text & "," End If End Sub Private Sub Command8_Click() Text1.Text = Text1.Text & 9 End Sub Private Sub Command9_Click() Text1.Text = Text1.Text & 8 End Sub Private Sub Form_Load() Text2 = "Rıza ACAR" Text3 = "11/H 1286" Text1 = "" Command13.ToolTipText = "Temizle" Command22.ToolTipText = "Çıkış" Command19.ToolTipText = "Karekökü Alır" Command18.ToolTipText = "Karesini Alır" Command20.ToolTipText = "Bölümden Kalanı Alır" Command15.ToolTipText = "Eşittir" Command14.ToolTipText = "Bölü" Command6.ToolTipText = "Çarpı" Command7.ToolTipText = "Eksi" Command17.ToolTipText = "Artı" Command8.ToolTipText = "Dokuz" Command9.ToolTipText = "Sekiz" Command10.ToolTipText = "Yedi" Command11.ToolTipText = "Altı" Command12.ToolTipText = "Beş" Command4.ToolTipText = "Dört" Command3.ToolTipText = "Üç" Command2.ToolTipText = "İki" Command1.ToolTipText = "Bir" Command21.ToolTipText = "pi sayısı" Command5.ToolTipText = "Nokta" Command16.ToolTipText = "Sıfır" Command23.ToolTipText = "Sayıyı bir azaltır" Command24.ToolTipText = "Sayıyı bir arttırır " Command25.ToolTipText = "Bütün fonksiyonları ve metin kutusunu temizler " Command26.ToolTipText = " Giriilen sayının logaritmasını hesaplar" Command27.ToolTipText = "Giriilen sayının doğal logaritmasını hesaplar" Command28.ToolTipText = "Girilen sayının alogaritmasını hesaplar" Command29.ToolTipText = "Girilen sayının cosinüsünü hesaplar" Command30.ToolTipText = "Girilen sayının sinüsünü hesaplar" Command31.ToolTipText = "Girilen sayının tanjantını hesaplar" Command32.ToolTipText = "Girilen sayının arctanjantını hesaplar" Command33.ToolTipText = "Sayıyı pozitif yada negatif yapar" Command34.ToolTipText = "Girilen sayıların faktoriylini hesaplar" Command35.ToolTipText = "Girilen sayının doğal alogaritmasını hesaplar" Command36.ToolTipText = "Girilen sayının cotantanjantını hesaplar" Command37.ToolTipText = "Girilen sayının küpünü alır" Command38.ToolTipText = "Girilen sayının yüzdesini hesaplar" Command39.ToolTipText = "Girilen sayının kdv sini hesaplar" Command40.ToolTipText = "Girilen sayının üssünü hesaplar" End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then If KeyAscii <> 8 Then KeyAscii = 0 End If End If End Sub | |
| Hayat Kisa Degmez Bir Kiza !! Bazen arkada$lik bazen sevili olmakti a$k Bana gore a$k fedakarlikti Bazen susmayi bilmek bazende dogru $eyleri konu$makti A$in icinde engeller oyunlar firtinlar yoktu A$k birbirini yipratmak degildi cunku A$k sinirsizca sorgusuzca sonsuzca sevmekti blok sıteme gırıs : [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] | |
| | |
![]() |
| Tags: bilimsel, hesap, makinesi, rca |
| Seçenekler | |
| Stil | |
| |