Load a form without showing it

前端 未结 8 1077
梦谈多话
梦谈多话 2020-12-09 19:39

Short version: I want to trigger the Form_Load() event without making the form visible. This doesn\'t work because Show() ignores the current value of the Visible property:<

8条回答
  •  春和景丽
    2020-12-09 20:36

    If you make the method public, then you could access it directly.... however, there could be some unexpected side effects when you call it. But making it public and calling it directly will not draw the screen or open the form.

提交回复
热议问题