# 试一试下面方式 ...

Posted by 安宝 on May 20, 1999 at 10:08:20:

In Reply to: 如何使DBGrid在执行阶段不能调整栏高与栏宽呢 posted by mosa on May 19, 1999 at 13:57:52:

Private Sub DBGrid1_ColResize(ByVal ColIndex As Integer, Cancel As Integer)
Cancel = True ' 取消所有的栏宽调整动作
End Sub

Private Sub DBGrid1_RowResize(Cancel As Integer)
Cancel = True ' 取消所有的栏高调整动作
End Sub

Private Sub Form_Load()
DBGrid1.AllowRowSizing = False
' 不允许栏高调整 , 设计阶段可控制
End Sub

Follow Ups: