Example #1
0
        private void listView1_MouseClick(object sender, MouseEventArgs e)
        {
            try
            {
                ListView listview = sender as ListView;

                foreach (IntPtr hWnd in ListHandles)
                {
                    if (GetHwnd.Get_WindowTextByHandle(hWnd).Contains(listview.SelectedItems[0].Text))
                    {
                        label3.Text = GetHwnd.Get_WindowAuthCode(hWnd);
                    }
                }
            }
            catch (Exception ex) { }
        }
Example #2
0
        private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            //RefreshListOfAuths();

            ListView listbox = sender as ListView;

            foreach (IntPtr hWnd in ListHandles)
            {
                try
                {
                    string windowText = GetHwnd.Get_WindowTextByHandle(hWnd);

                    if (windowText.Contains(listbox.SelectedItems[0].Text))
                    {
                        string CODE = GetHwnd.Get_WindowAuthCode(hWnd);
                        label3.Text = CODE;
                        Clipboard.SetText(CODE);
                    }
                }
                catch (Exception ex) { }
            }
        }