public FormCodingAssessment() { InitializeComponent(); SystemMenuItem = new SystemMenuItem(); SystemMenuItem.AddSystemMenuItem(Handle, ApplicationType.LocalApplication); InitializeAndRunFindCalculatorBackgroundWorker(); }
private void FindCalculatorBackgroundWorker_DoWork(object sender, DoWorkEventArgs args) { // Continuously check to see if the calculator is open. while (true) { SystemMenuItem.CheckForCalculatorAndAddMenuItem(); System.Threading.Thread.Sleep(500); } }