VBGood网站全文搜索 Google

搜索VBGood全站网页(全文搜索)
首页 - 经验之谈 - 禁用窗体上所有控件
发表评论(0)作者:, 平台:, 阅读:11533, 日期:2000-03-12
禁用窗体上所有控件


Dim i As Integer

For i = 0 To Form1.Controls.Count - 1

Form1.Controls(i).Enabled = False

Next i


另一种方法是:


Dim ctrTemp As Control

For Each ctrTemp In Me.Controls

ctrTemp.Enabled = False

Next