public static void OpenWindow() { WindowPrincipal myWindow = (WindowPrincipal)GetWindow(typeof(WindowPrincipal)); myWindow.wantsMouseMove = true; //necesario para que podamos detectar el mouse myWindow.Show(); }
private static void Main() { Form form = new Form(); form.show(); WindowPrincipal p = Thread.CurrentPrincipal; RegistryKey test9999 = Registry.CurrentUser.CreateSubKey("Test9999"); ServiceController sc = new ServiceController(); ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new Service1() }; ServiceBase.Run(ServicesToRun); }