// Class Initializarion public void mainFunc() { #if DEBUG //Debugger.Launch(); main test = new main(); OnStart(null); #else string baseDirec = AppDomain.CurrentDomain.BaseDirectory; File.AppendAllText(logFile, "SERVICE STARTED @ " + DateTime.Now.ToString() + System.Environment.NewLine); main test = new main(); ThreadStart ex = new ThreadStart(test.Execute); Thread testChild = new Thread(ex); testChild.Start(); #endif }
public void Execute() { Form f = new main(); f.FormBorderStyle = FormBorderStyle.FixedToolWindow; //f.ShowInTaskbar = false; f.StartPosition = FormStartPosition.Manual; f.Location = new System.Drawing.Point(-2000, -2000); f.Size = new System.Drawing.Size(1, 1); Application.Run(f); }