2010-01-07 2 views

답변

0

나는, 아니 자신의 창에게 그가 다른 윈도우의 핸들을 얻으려고 생각

2
public Form1() 
    { 
    InitializeComponent(); 
    List<IntPtr> handles = GetHandles(this.Controls); 
    } 

    public List<IntPtr> GetHandles(Control.ControlCollection inControls) 
    { 
    List<IntPtr> list_of_handles = new List<IntPtr>(); 
    if(inControls != null) 
    { 
     foreach (Control c in inControls) 
     { 
      list_of_handles.Add(c.Handle); 
      list_of_handles.AddRange(GetHandles(c.Controls)); 
     } 
    } 
    return list_of_handles; 
    }