الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

مسح الكتابه الموجودة بالتيكست بوكس

بدأه evry1falls في 1 نوفمبر 2010 · 0 رد · 376 مشاهدة · في لغة Ms Visual Basic 6 وما قبلها من إصدارات
مشاركة: واتساب X فيسبوك تيليجرام
#1

TextBoxes are just like any other Objects on a form, could be cleared or we can say "Make it empty" .

so if we have :

Textbox1 and Textbox2 and Textbox3 on a form and we have a button called "CmdNew" and its function is to clear all the writings in all of the 3 TextBoxes .... we can do something like that :-

Private Sub Cmd_New_Click()

TextBox1.Text = ""

TextBox2.Text = ""

TextBox3.Text = ""

End Sub

Or .........

General Declarations

Dim TxtBx as Control

Public Sub ClearAllTxtBxs()

For each TxtBx in Me.Controls

If TypeOf TxtBx Is TextBox Then

TxtBx.Text = ""

End If

Next TxtBx

End Sub

Private Sub Cmd_New_Click()

ClearAllTxtBxs()

End Sub

Now ........

What if we have ComboBoxes Too ?

Or .........

What if we have various objects that we wanna set thier values to anything .... ??

- if you understood the previous example i think you already knew the answer ....

Good Luck

Evry1falls

تم تعديل هذه المشاركة بواسطة evry1falls في 1 نوفمبر 2010 في 19:41

1

Visit Me personally
Visit My Facebook VB Page

فى انتظار تعليقاتكم و اسئلتكم على
Evry1falls (Visual Basic) Plus+

 

 

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…