بسم الله الرحمن الرحيم
نرجوا التوجية وشكرا.
لكودلإنشاء آلة حاسبة بها خدمات جميلة وبها حركات برمجية جميله
الاستفسار:هنا في
Private Sub Command10_Click()
Text1 = "0"
End Sub
كيف اجعل زر الصفر يطبع في text الذي اختاره
Sub Explode(form1 As Form)
form1.Width = 0
form1.Height = 0
form1.Show
For x = 0 To 6000 Step 1
form1.Width = x
form1.Height = x
With form1
.Left = (Screen.Width - .Width) / 2
.Top = (Screen.Height - .Height) / 2
End With
Next
End Sub
Sub Explode1(form1 As Form)
form1.Width = 0
form1.Height = 0
form1.Show
For x = 6000 To 0 Step -1
form1.Width = x
form1.Height = x
With form1
.Left = (Screen.Width - .Width) / 2
.Top = (Screen.Height - .Height) / 2
End With
Next
End Sub
Private Sub Command1_Click()
sumvalue = Val(Text1.Text) + Val(Text2.Text)
Label1.Caption = "النتيجة" + Str(sumvalue)
End Sub
Private Sub Command10_Click()
mulvalue = Val(Text1.Text) ^ 3
Label1.Caption = "النتيجة" + Str(mulvalue)
End Sub
Private Sub Command2_Click()
sumvalue = Val(Text1.Text) - Val(Text2.Text)
Label1.Caption = "النتيجة" + Str(sumvalue)
End Sub
Private Sub Command3_Click()
mulvalue = Val(Text1.Text) * Val(Text2.Text)
Label1.Caption = "النتيجة" + Str(mulvalue)
End Sub
Private Sub Command4_Click()
modvalue = Val(Text1.Text) / Val(Text2.Text)
Label1.Caption = "النتيجة" + Str(modvalue)
End Sub
Private Sub Command5_Click()
powervalue = Val(Text1.Text) ^ (1 / 2)
Label1.Caption = "النتيجة" + Str(powervalue)
End Sub
Private Sub Command6_Click()
sqrtvalue = Val(Text1.Text) * (1 / 2)
Label1.Caption = " النتيجة" + Str(sqrtvalue)
End Sub
Private Sub Command7_Click()
Text1 = ""
Text2 = ""
Label1 = "النتيجة"
End Sub
Private Sub Command8_Click()
sqrtvalue = Val(Text1.Text) ^ (1 / 3)
Label1.Caption = "النتيجة" + Str(sqrtvalue)
End Sub
Private Sub Command9_Click()
mulvalue = Val(Text1.Text) ^ 2
Label1.Caption = "النتيجة" + Str(mulvalue)
End Sub
Private Sub Form_Load()
Dim pass As String
Do Until (passw = "الالة")
passw = InputBox("ادخل كلمة المرورالتي هي بنفس الاسم ", "كلمة مرور مطلوبة")
Loop
Explode Me
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Form_Unload(Cancel As Integer)
Explode1 Me
End Sub
Private Sub Command10_Click()
Text1 = "0"
End Sub