获得所有打开的窗体句柄,在线等^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 要用到WIN32API EnumWindows,但是我不会用会用的帮忙写个例子,谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 using System.Runtime.InteropServices;public delegate bool WNDENUMPROC(IntPtr hwnd, int lParam);[DllImport("user32.dll")]public static extern int EnumWindows(WNDENUMPROC lpEnumFunc, int lParam);public static bool EnumFunc(IntPtr hwnd, int lParam){ Console.WriteLine("Window handle is " + hwnd); return true;}private void button1_Click(object sender, EventArgs e){ EnumWindows(EnumFunc, 0);} var ,List(T),要怎么清除出内存? winform界面切换. TreeView选中一个节点怎么让他连接到一个模块 AD校验用户 窗體取得焦點問題,或是怎么知道哪個窗體為當前活動窗體 VS 2003怎么打开VS 2005创建的解决方案? ——分不多了,提个绝对大家都关心的问题!—— 自定义控件的奇怪问题 C#访问ACCESS数据库。 ¥$@請問flash Mx 與XML 結合做button menu? 请教TextBox控制输入的问题 datatable中有大量数据(>50万),怎样使它快速导入到一个已存在的SQLSERVER表中?
public static extern int EnumWindows(WNDENUMPROC lpEnumFunc, int lParam);public static bool EnumFunc(IntPtr hwnd, int lParam)
{
Console.WriteLine("Window handle is " + hwnd);
return true;
}private void button1_Click(object sender, EventArgs e)
{
EnumWindows(EnumFunc, 0);
}