日期:2014-05-17  浏览次数:21039 次

c# API 获得窗体的内容
有个软件是delphi写 上面有个panel控件 内面有个webbrowser 控件
我想得到webbrowser 里面的内容
C# code

[DllImport("user32.dll", EntryPoint = "FindWindow", CharSet = CharSet.Ansi)]  
        public static extern IntPtr FindWindow(string className, string windowName); 

        [DllImport("user32.dll", EntryPoint = "GetWindowText", CharSet = CharSet.Ansi)]

        public static extern bool GetWindowText(IntPtr hWnd, [OutAttribute()] StringBuilder strNewWindowName, Int32 maxCharCount);



这个好像只能得到标题吧!

求好心人帮忙啊

------解决方案--------------------
读取WebBrowser的DocumentStream
------解决方案--------------------
DocumentText