利用winfrom程序获取当前ie的地址栏 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 使用 System.Diagnostics.Process[] _List = System.Diagnostics.Process.GetProcessesByName("iexplore"); 然后用 [DllImport("user32.dll")] public static extern int EnumChildWindows(IntPtr hWndParent, EnumWindowsProc ewp, int lParam); 获取到地址栏 就可以了 IntPtr hwndIE =FindWindow("IEFrame",null); IntPtr hwndWorker = FindWindowEx(new HandleRef(this,hwndIE),new HandleRef(this,IntPtr.Zero), "WorkerW",null); IntPtr hwndToolbar = FindWindowEx(new HandleRef(this,hwndWorker),new HandleRef(this,IntPtr.Zero), "ReBarWindow32",null); IntPtr hwndComboboxex = FindWindowEx(new HandleRef(this,hwndToolbar), new HandleRef(this,IntPtr.Zero), "ComboBoxEx32",null); StringBuilder sb = new StringBuilder(1024); const int WM_GETTEXT=0x000D; SendMessage(hwndComboboxex,WM_GETTEXT,sb.Capacity,sb); datagridview一些些问题 菜鸟求助!!!(急) 怎么做图片框水平翻转效果 C#WINFORM如何获取局域网的所有机器的IP和机器名? 各位帮忙,着急!搞不定就会不了家了 奇怪的问题:属性窗口不出来了,F4键、重启.net环境、选择[视图]-〉[属性窗口]也无效!请问你们碰到过没有啊? 怎么防止制作的安装程序卸载dll? switch case问题 sql语句的问题-------时间转字符 能帮我解释一下C#中的代表(delegate)是什么意思??? C#文件传输,数据流的转化问题 XML节点读取失败
System.Diagnostics.Process[] _List = System.Diagnostics.Process.GetProcessesByName("iexplore"); 然后用
[DllImport("user32.dll")]
public static extern int EnumChildWindows(IntPtr hWndParent, EnumWindowsProc ewp, int lParam);
获取到地址栏 就可以了
IntPtr hwndWorker = FindWindowEx(new HandleRef(this,hwndIE),new HandleRef(this,IntPtr.Zero), "WorkerW",null);
IntPtr hwndToolbar = FindWindowEx(new HandleRef(this,hwndWorker),new HandleRef(this,IntPtr.Zero), "ReBarWindow32",null);
IntPtr hwndComboboxex = FindWindowEx(new HandleRef(this,hwndToolbar), new HandleRef(this,IntPtr.Zero), "ComboBoxEx32",null);
StringBuilder sb = new StringBuilder(1024);
const int WM_GETTEXT=0x000D;
SendMessage(hwndComboboxex,WM_GETTEXT,sb.Capacity,sb);