![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | automating ie or webbrowser control Hello, In VB 6 I could easily get to the document object of either internet explorer, or the web browser control, and get all the links, etc. through arrays. In VB.net I can't even seem to assign the document object to a variable (thedoc). So I can't get to any of the info I need. Is there something I'm missing? Here's the code I used, or attempted to use. Thanks. Scott Public IE As SHDocVw.InternetExplorer Dim ie As SHDocVw.InternetExplorer ie = New SHDocVw.InternetExplorer ie.Visible = True ie.Navigate("http://www.msn.com") Do While ie.Busy Application.DoEvents() Loop dim iestuff as string="" For ix As Integer = 0 To thedoc.Links.Count - 1 iestuff = iestuff & thedoc.Links(ix).href & ControlChars.CrLf Next |
My System Specs![]() |
| | #2 (permalink) |
| | Re: automating ie or webbrowser control "Scott Baxter" <scott@xxxxxx> wrote in message news:eNT0rt83JHA.1372@xxxxxx Quote: > Hello, > > In VB 6 I could easily get to the document object of either internet > explorer, or the web browser control, and get all the links, etc. through > arrays. > > In VB.net I can't even seem to assign the document object to a variable > (thedoc). So I can't get to any of the info I need. > > Is there something I'm missing? > > Here's the code I used, or attempted to use. > > Thanks. > > Scott > > Public IE As SHDocVw.InternetExplorer > Dim ie As SHDocVw.InternetExplorer > ie = New SHDocVw.InternetExplorer > ie.Visible = True > ie.Navigate("http://www.msn.com") > Do While ie.Busy > Application.DoEvents() > Loop > dim iestuff as string="" > For ix As Integer = 0 To thedoc.Links.Count - 1 > iestuff = iestuff & thedoc.Links(ix).href & ControlChars.CrLf > Next same thing you posted, just changed to VBScript syntax. Set oIE = CreateObject("InternetExplorer.Application") oIE.visible = True oIE.navigate "http://www.msn.com" Do While oIE.busy WScript.Sleep 100 Loop For Each sLink in oIE.document.links sLinks = sLinks & sLink & vbCrLf Next MsgBox sLinks |
My System Specs![]() |
| | #3 (permalink) |
| | Re: automating ie or webbrowser control Scott, Since version VB8 there is a special Net webbrowser (which uses ShDocVw as well) You are using the old Intereop one, in fact that one should work the same as in VB6 an VB7 but it is possible that it is not exact like that. Try to avoid that do events loop, that completely eats your processing. As you want a stop use sleep, or better an even about the document complete. By the way, your post is in all other newsgroups you posted too beside languages.vb simply spam. Cor |
My System Specs![]() |
| | #4 (permalink) |
| | Re: automating ie or webbrowser control Hello, Thanks. I'll look for that Net Webbrowser. I had made some posts without much answer, so I posted to the other groups in hope of a response. Sorry for any inconvenience. Scott "Cor Ligthert[MVP]" <Notmyfirstname@xxxxxx> wrote in message news:Ob85OTD4JHA.4872@xxxxxx Quote: > Scott, > > Since version VB8 there is a special Net webbrowser (which uses ShDocVw as > well) > > You are using the old Intereop one, in fact that one should work the same > as in VB6 an VB7 but it is possible that it is not exact like that. > > Try to avoid that do events loop, that completely eats your processing. > As you want a stop use sleep, or better an even about the document > complete. > > By the way, your post is in all other newsgroups you posted too beside > languages.vb simply spam. > > Cor |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How do I debug JavaScript in a WebBrowser control? | .NET General | |||
| How to copy text from webbrowser/Frame Control (WPF) | .NET General | |||
| is the dotnet 2 webbrowser control based on IE 6 or 7? | .NET General | |||
| Printint the content of a webbrowser control | .NET General | |||