Exemplo n.º 1
0
        private void btn_ActiveWindow_Click(object sender, EventArgs e)
        {
            IntPtr pt = new IntPtr(Convert.ToInt32(txt_SelectedCell.Text, 16));

            ExternalCode.SetActiveWindow(pt);
            ExternalCode.SetForegroundWindow(pt);
        }
Exemplo n.º 2
0
        private void btn_GetTreeViewCount_Click(object sender, EventArgs e)
        {
            DataTable dt      = new DataTable();
            IntPtr    vHandle = new IntPtr(Convert.ToInt32(txt_SelectedCell.Text, 16));

            ExternalCode.GetTreeViewText(vHandle, dt);
            dgv_TreeView.DataSource = dt;
        }
Exemplo n.º 3
0
        private void btn_GetWindowPos_Click(object sender, EventArgs e)
        {
            IntPtr ptr = new IntPtr(Convert.ToInt32(txt_SelectedCell.Text, 16));

            ExternalCode.RECT rect = new ExternalCode.RECT();
            ExternalCode.GetWindowRect(ptr, ref rect);

            txt_WindowX.Text = rect.Left.ToString();
            txt_WindowY.Text = rect.Top.ToString();

            txt_WindowHeight.Text = (rect.Bottom - rect.Top).ToString();
            txt_WindowWidth.Text  = (rect.Right - rect.Left).ToString();
        }
Exemplo n.º 4
0
        private void btn_MoveWindow_Click(object sender, EventArgs e)
        {
            IntPtr ptr = new IntPtr(Convert.ToInt32(txt_SelectedCell.Text, 16));

            ExternalCode.MoveWindow(ptr, Convert.ToInt32(txt_WindowX.Text), Convert.ToInt32(txt_WindowY.Text), Convert.ToInt32(txt_WindowWidth.Text), Convert.ToInt32(txt_WindowHeight.Text), true);
        }