public MirroredForm(Form mainfrm) { InitializeComponent(); _mainForm = mainfrm as OriginalForm; this.ShowInTaskbar = false; this.WindowState = FormWindowState.Normal; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); InjectorFactory injectorFactory = new InjectorFactory(); IFormInjector makeFormInjector = injectorFactory.MakeFormInjector(new[] { new DefaultProcessSelector("explorer", Process.GetCurrentProcess().ProcessName, "devenv", "ApplicationFrameHost", "ScriptedSandbox64") }); MirrorState stateObject = new MirrorState(); stateObject.Active = false; OriginalForm originalForm = new OriginalForm(stateObject, makeFormInjector); makeFormInjector.Inject(ptr => new StartMirroringForm(ptr, stateObject, originalForm.StartMirroring, originalForm.StopMirroring)); Application.Run(originalForm); }
public SecondScreenMirror(Form mainfrm) { InitializeComponent(); _mainForm = mainfrm as OriginalForm; }