这个代码能放在CurrentChanged事件中呢,这个事件是换行的代码,每次换行执行一次,而你的代码实际上只需启动后执行一次就行,所以应该放在项目事件AfterOpenProject中。
如果要个每个表生效:
For Each dt As DataTable in DataTables
dt.SysStyles("Frozen").BackColor = Color.LightCyan
dt.SysStyles("CurrentRow").BackColor = Color.Blue
dt.SysStyles("CurrentRow").ForeColor = Color.White
Next