static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var login = new LoginForm(); login.ShowDialog(); var list = new ServerListForm(); list.ShowDialog(); using (var client = new ClientForm(ParseEndPoint(list.SelectedServer.Ip))) Application.Run(client); }