全局代码
Public Sub BaseMainform_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) basemainform.Windowstate = 2End Sub
afterOpenProject代码
addhandler basemainform.resize, addressof BaseMainform_Resize