Remove OnSize in MainFrame

Remove OnSize in MainFrame