منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : التحقق من وجود نص فى التكست بوكس
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
الصفحات : 1 2 3
السلام عليكم

انسخي هذه الاكواد الى برنامج


PHP كود :
Private Sub Text10_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text11_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text12_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text4_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text5_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text6_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text7_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + Val(Text8.Text) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text8_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text9_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub 


بالتوفيق

وهذا برنامجك بعد التعديل

المشكلة كانت في text8  راجعيها هتلاقي الفرق هو عدم ضرب قيمة text8 * 20


بالتوفيق
(01-03-16, 12:00 AM)ahmedabdelaliem كتب : [ -> ]السلام عليكم

انسخي هذه الاكواد الى برنامج


PHP كود :
Private Sub Text10_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text11_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text12_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text4_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text5_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text6_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text7_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + Val(Text8.Text) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text8_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub

Private Sub Text9_Change()
Text34.Text = (Val(Text4.Text) * 20) + (Val(Text5.Text) * 20) + (Val(Text6.Text) * 20) + (Val(Text7.Text) * 20) + (Val(Text8.Text) * 20) + (Val(Text9.Text) * 20) + (Val(Text10.Text) * 20) + (Val(Text11.Text) * 20) + (Val(Text12.Text) * 20)
End Sub 


بالتوفيق

وهذا برنامجك بعد التعديل

المشكلة كانت في text8  راجعيها هتلاقي الفرق هو عدم ضرب قيمة text8 * 20


بالتوفيق
اشكرك على الرد لكن اعلم جيدا انى وضعت قيم text8  لكن اختفت بعد التشغيل لاادرى لماذا ولكن .... اكرر الشكر على الافاده
السلام عليكم ورحمه اللة وبركاته 
سؤالي هو كيف اجعل التكست بوكس يظهر بالون الاحمر عند اضافه المستخدم للمصطلح الخطأ اكون شاكره لمن يساعدني بكتابه الكود
وعليكم السلام ورحمة الله وبركاته

جرب التالي

PHP كود :
Private Sub Text1_Change()
If 
Text1.Text "Test" Then
Text1
.ForeColor vbBlue
Else
Text1.ForeColor vbRed
End 
If
End Sub 

بالتوفيق .
الصفحات : 1 2 3