C# WindowsForm程序同时启动多个窗口类,具体内容如下
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MVCProject
{
///
/// 多窗口同时启动类
/// 继承ApplicationContext的原因是Application.Run(ApplicationContext context);参数的需要
/// 另一个是关闭同时启动的窗口
///
class MultiFormApplictionStart : ApplicationContext
{
private void onFormClosed(object sender, EventArgs e)
{
if (Application.OpenForms.Count == 0)
{
ExitThread();
}
}
public MultiFormApplictionStart()
{
var formList = new List


