Dim g = e.Form.Controls("RecordGrid1").BaseControlg.AutoSizeRows
-----------------
Dim g = e.Form.Controls("RecordGrid1").BaseControlFor Each r As object In g.rows r.height = 20Next
Dim g = Forms("窗口1").Controls("RecordGrid1").BaseControlg.AutoSizeRows
查了系统的记录窗口,没找到控件,运行代码,提示"记录窗口"不存在,但系统的这个窗口名称没错呀。
Dim g = Forms("记录窗口").Controls("RecordGrid").BaseControlg.AutoSizeRows