示例#1
0
        private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
            foreach (IntPtr hwnd in list)
            {
                Win32Api.SetWindowPos(hwnd.ToInt32(), -2, 0, 0, 0, 0, 0x001 | 0x002 | 0x040);
                fdn.ResetOpi(hwnd);
            }
            #region 卸载鼠标钩子
            //fdn.UnHook();
            #endregion

            if (t != null)
            {
                stop = true;
                //
            }
        }
示例#2
0
 private void button1_Click(object sender, EventArgs e)
 {
     //if (!isStart)
     //    isStart = true;
     if (this.comboBox1.Items.Count > 0)
     {
         ComboBoxItem cbi = this.comboBox1.SelectedItem as ComboBoxItem;
         if (cbi != null)
         {
             IntPtr hwnd = cbi.ItemValue;
             Win32Api.SetWindowPos(hwnd.ToInt32(), -1, 0, 0, 0, 0, 0x001 | 0x002 | 0x040);
             //fdn.ChangeOpi(hwnd, this.trackBar1.Value);
             if (!list.Contains(hwnd))
             {
                 list.Add(hwnd);
             }
         }
     }
 }
示例#3
0
        private void button2_Click(object sender, EventArgs e)
        {
            //foreach (IntPtr hwnd in list)
            //{
            //    Win32Api.SetWindowPos(hwnd.ToInt32(), -2, 0, 0, 0, 0, 0x001 | 0x002 | 0x040);
            //    fdn.ResetOpi(hwnd);
            //}

            if (this.comboBox1.Items.Count > 0)
            {
                ComboBoxItem cbi = this.comboBox1.SelectedItem as ComboBoxItem;
                if (cbi != null)
                {
                    IntPtr hwnd = cbi.ItemValue;
                    Win32Api.SetWindowPos(hwnd.ToInt32(), -2, 0, 0, 0, 0, 0x001 | 0x002 | 0x040);
                    fdn.ResetOpi(hwnd);
                }
            }
        }