Ejemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            BlackAero aero    = new BlackAero();
            Thread    Threads = new Thread(new ThreadStart(Hooks));

            Threads.Start();
            aero.StartBlackAero();

            if (IniFile.ReadIniData("rightwin10", "value", null, System.IO.Directory.GetCurrentDirectory() + "\\config.ini") == "true")
            {
                checkBox1.Checked = true;
            }
            if (IniFile.ReadIniData("output", "value", null, System.IO.Directory.GetCurrentDirectory() + "\\config.ini") == "true")
            {
                checkBox2.Checked = true;
            }
            if (IniFile.ReadIniData("tray", "value", null, System.IO.Directory.GetCurrentDirectory() + "\\config.ini") == "true")
            {
                checkBox3.Checked = true;

                ShowInTaskbar       = false;
                WindowState         = FormWindowState.Minimized;
                Visible             = false;
                notifyIcon1.Visible = true;
                Hide();
            }
        }
Ejemplo n.º 2
0
 public void ProcessAeros(string name)
 {
     try
     {   //同进程名的所有窗口
         Process[] localByName = Process.GetProcessesByName(name);
         for (int i = 0; i < localByName.Length; i++)
         {
             BlackAero aero = new BlackAero();
             aero.GetMainWindowHandle(localByName[i].Id);
         }
     }
     catch { /*进程不存在*/ }
 }