C# 怎么隐藏正在运行的IE窗体 本帖最后由 hjwei02 于 2010-09-08 21:31:35 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 [DllImport("User32.dll")] private static extern bool ShowWindow(IntPtr hWnd, int cmdShow); private void button1_Click_1(object sender, EventArgs e) { Process[] processes = Process.GetProcesses(); foreach (Process mypros in processes) { if (mypros.ProcessName == "iexplore") { ShowWindow(mypros.MainWindowHandle, 0); } } } [DllImport("User32.dll", EntryPoint="FindWindow", CharSet=CharSet.Auto)] public static extern int FindWindow(String className, String captionName); [DllImport("User32.dll", EntryPoint="ShowWindow", CharSet=CharSet.Auto)] public static extern int ShowWindow(int hwnd,int nCmdShow); private void BtnHide_Click(object sender, System.EventArgs e) { ShowWindow(FindWindow("",null),0); }查询IE窗口 foreach (Process process in Process.GetCurrentProcess) { if (process.Id != current.Id) { if (mypros.ProcessName == "iexplore"){} } C# DLLImport 菜鸟请教 问一个关于用c# dataset保存T-SQL存储过程的返回集合 往数据库中添加datetime类型数据 怎么获得用户按了哪个按钮 奋斗了两个月,终于找到了一个理想的工作,特来散分!!! 如何在C#中回車換行啊? COM 对象无效或未注册。没分了,就当无偿帮忙吧!!知道的进来看下 控件的AccessibleDescription到底有什么作用?没看出来 再问一个DataGrid的问题。 为什么在web中不能生成excel文件,它提示没有权限创建application?源码如下 请教一个关于构造函数的问题 为什么更新数据库后,刚刚更新数据一瞬间又消失了???
private static extern bool ShowWindow(IntPtr hWnd, int cmdShow); private void button1_Click_1(object sender, EventArgs e)
{
Process[] processes = Process.GetProcesses();
foreach (Process mypros in processes)
{
if (mypros.ProcessName == "iexplore")
{
ShowWindow(mypros.MainWindowHandle, 0);
}
}
}
public static extern int FindWindow(String className, String captionName);
[DllImport("User32.dll", EntryPoint="ShowWindow", CharSet=CharSet.Auto)]
public static extern int ShowWindow(int hwnd,int nCmdShow); private void BtnHide_Click(object sender, System.EventArgs e)
{
ShowWindow(FindWindow("",null),0);
}
查询IE窗口
foreach (Process process in Process.GetCurrentProcess)
{
if (process.Id != current.Id)
{
if (mypros.ProcessName == "iexplore"){}
}