悬赏分:10 浏览:168 次
|
// For Windows Mobile, replace user32.dll with coredll.dll
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
用这个函数可以通过窗体名找到窗体句柄,如果句柄不存在,就New,否则就显示
这个窗体
WinForms里面? 使用属性:Application.OpenForms foreach(Form f in Application.Current.OpenForms) { .... } |