منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
[vb6.0] التحقق من وجود نص فى التكست بوكس - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغات البرمجة الاخرى (http://vb4arb.com/vb/forumdisplay.php?fid=4)
+--- قسم : قسم لغة vb6.0 (http://vb4arb.com/vb/forumdisplay.php?fid=18)
+---- قسم : قسم أسئلة vb6.0 (http://vb4arb.com/vb/forumdisplay.php?fid=28)
+---- الموضوع : [vb6.0] التحقق من وجود نص فى التكست بوكس (/showthread.php?tid=14905)

الصفحات: 1 2 3


RE: التحقق من وجود نص فى التكست بوكس - ahmedabdelaliem - 01-03-16

السلام عليكم

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


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


بالتوفيق


RE: التحقق من وجود نص فى التكست بوكس - norhan - 01-03-16

(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  لكن اختفت بعد التشغيل لاادرى لماذا ولكن .... اكرر الشكر على الافاده


RE: التحقق من وجود نص فى التكست بوكس - مريم العنزي - 09-11-19

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


RE: التحقق من وجود نص فى التكست بوكس - AL_BRNS - 09-11-19

وعليكم السلام ورحمة الله وبركاته

جرب التالي

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

بالتوفيق .