منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
تعبئة او تنظيف كل مربعات النصوص TextBoxes - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182)
+--- قسم : قسم مكتبة اكواد VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=185)
+--- الموضوع : تعبئة او تنظيف كل مربعات النصوص TextBoxes (/showthread.php?tid=47468)



تعبئة او تنظيف كل مربعات النصوص TextBoxes - justforit - 10-11-23

PHP كود :
Private Sub ClearTextBoxes(ByVal root As Control)
 
    For Each ctrl As Control In root.Controls
         ClearTextBoxes
(ctrl)
 
        If TypeOf ctrl Is TextBox Then
             CType
(ctrlTextBox).Text String.Empty
 
        End If
 
    Next ctrl
 End Sub
 
Private Sub fill(ByVal root As Control)
 
    For Each ctrl As Control In root.Controls
         fill
(ctrl)
 
        If TypeOf ctrl Is TextBox Then
             CType
(ctrlTextBox).Text ctrl.Name
         End 
If
 
    Next ctrl
 End Sub 
بزر الامر نكتب: ClearTextBoxes(Me)
او
 fill(Me)