C# Application.Run without Form

后端 未结 4 1710
忘掉有多难
忘掉有多难 2020-12-06 11:06

Is it possible to call Application.Run, but to not pass a form parameter, or is there an alternative if there’s no form to call?

The Run method doesn’t seem to have

4条回答
  •  太阳男子
    2020-12-06 11:29

    You can use the overload of Application.Run that accepts an application context as its only parameter. An ApplicationContext is basically just a class that you can inherit from and add any functionality you like. See the example in the link for more information.

提交回复
热议问题