9keng


Code Snippet(3)> clear ค่า 20 textbox ภายในคลิกเดี๋ยว

เขียนแล้วใน Programming โดย 9keng บน เมษายน 1, 2007
ทำการวนลูปภายใน form, แล้วตรวจสอบว่าเป็น textbox หรือเปล่า

foreach (Control tx in this.Controls)
{
  if (tx.GetType() == typeof(System.Windows.Forms.TextBox))
  {
    tx.Text = "";
  }
}

ใส่ความเห็น

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out / เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out / เปลี่ยนแปลง )

Connecting to %s


Follow

Get every new post delivered to your Inbox.