'15 tane command nesnesi bunların üzerine 0'dan 9 aVb de windowsun hesap makinesine benzeyen bir program
'kadar rakam ekleyin son dört tanesinede +,-,*,/
'işaretlerini
'ekleyin
'3 tane text kutusu 1 tanesi sayı girişi için
'diğer iki kutunun visible özelliklerini false yapıyoruz
'bir tanesine hangi işarete + mı -(eksi) mi basılmış onu
'kontrol
'ediyoruz ona göre işlem yaptırıyoruz
' İnş.faydalı olur
' selamlar
Private Sub Command1_Click()
Text1.Text = Text1.Text + "0"
End Sub
Private Sub Command10_Click()
Text1.Text = Text1.Text + "9"
End Sub
Private Sub Command11_Click()
Clipboard.SetText Val(Text1.Text)
Text1.Text = ""
Text1.SetFocus
Text2.Text = "+"
End Sub
Private Sub Command12_Click()
Text2.Text = "-"
Clipboard.SetText Val(Text1.Text)
Text1.Text = ""
Text1.SetFocus
End Sub
Private Sub Command13_Click()
Text2.Text = "*"
Clipboard.SetText Val(Text1.Text)
Text1.Text = ""
Text1.SetFocus
End Sub
Private Sub Command14_Click()
Text2.Text = "/"
Text3.Text = Text1.Text
Text1.Text = ""
End Sub
Private Sub Command15_Click()
If Text2.Text = "+" Then
Text1.Text = Format(Val(Clipboard.GetText) + Val(Text1.Text), "#,###,###")
End If
If Text2.Text = "-" Then
Text1.Text = Format(Val(Clipboard.GetText) - Val(Text1.Text), "#,###,###")
End If
If Text2.Text = "*" Then
Text1.Text = Format(Val(Clipboard.GetText) * Val(Text1.Text), "#,###,###")
End If
If Text2.Text = "/" Then
Text1.Text = Format(Val(Text3.Text) / Val(Text1.Text), "#,###,###")
End If
End Sub
Private Sub Command2_Click()
Text1.Text = Text1.Text + "1"
End Sub
Private Sub Command3_Click()
Text1.Text = Text1.Text + "2"
End Sub
Private Sub Command4_Click()
Text1.Text = Text1.Text + "3"
End Sub
Private Sub Command5_Click()
Text1.Text = Text1.Text + "4"
End Sub
Private Sub Command6_Click()
Text1.Text = Text1.Text + "5"
End Sub
Private Sub Command7_Click()
Text1.Text = Text1.Text + "6"
End Sub
Private Sub Command8_Click()
Text1.Text = Text1.Text + "7"
End Sub
Private Sub Command9_Click()
Text1.Text = Text1.Text + "8"
End Sub
Private Sub Form_Load()
Picture1.BackColor = RGB(100, 100, 200)
Text1.MaxLength = 13
Form1.Caption = "Hesap makinesi VER1.0 Burhan ERDOĞAN"
Text1.Text = "0"
Text1.Alignment = 1
Command1.Caption = "0"
Command2.Caption = "1"
Command3.Caption = "2"
Command4.Caption = "3"
Command5.Caption = "4"
Command6.Caption = "5"
Command7.Caption = "6"
Command8.Caption = "7"
Command9.Caption = "8"
Command10.Caption = "9"
Command11.Caption = "+"
Command12.Caption = "-"
Command13.Caption = "x"
Command14.Caption = "/"
Command15.Caption = "="
Text1.Text = ""
Text2.Visible = False
Text3.Text = ""
Text3.Visible = False
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Text1.BackColor = vbWhite
End Sub
Private Sub Text1_Change()
Text1.Text = Format(Text1.Text, "#,###,###")
End Sub
Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Text1.BackColor = RGB(255, 230, 100)
End Sub
Private Sub islemyap()
Dim os, ss
End Sub


TUĞGENERAL



Alıntı ile Cevapla
Bu Konuyu Paylaşın !