static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new FormOSM_Login()); FormOSM_Login Log = new FormOSM_Login(); Log.StartPosition = FormStartPosition.CenterScreen; Log.ShowDialog(); if (Log.DialogResult == DialogResult.OK) { string id = Log.id; string userid = Log.userid; string username = Log.username; Application.Run(new FormOSM_Main(id, userid, username)); } }